Skip to content

Commit f6d9776

Browse files
committed
Merge branch 'master' of https://github.com/pandas-dev/pandas
2 parents 87835fa + 34ae1cf commit f6d9776

File tree

181 files changed

+2381
-2037
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

181 files changed

+2381
-2037
lines changed

.pre-commit-config.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,17 @@ repos:
6666
from\ pandas\.core\ import\ common|
6767
6868
# Check for imports from collections.abc instead of `from collections import abc`
69-
from\ collections\.abc\ import|
69+
from\ collections\.abc\ import
7070
71-
from\ numpy\ import\ nan
71+
- id: non-standard-numpy.random-related-imports
72+
name: Check for non-standard numpy.random-related imports excluding pandas/_testing.py
73+
language: pygrep
74+
exclude: pandas/_testing.py
75+
entry: |
76+
(?x)
77+
# Check for imports from np.random.<method> instead of `from numpy import random` or `from numpy.random import <method>`
78+
from\ numpy\ import\ random|
79+
from\ numpy.random\ import
7280
types: [python]
7381
- id: non-standard-imports-in-tests
7482
name: Check for non-standard imports in test suite

ci/azure/windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
py38_np18:
1717
ENV_FILE: ci/deps/azure-windows-38.yaml
1818
CONDA_PY: "38"
19-
PATTERN: "not slow and not network"
19+
PATTERN: "not slow and not network and not high_memory"
2020

2121
steps:
2222
- powershell: |

ci/code_checks.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ function invgrep {
3838
}
3939

4040
function check_namespace {
41-
local -r CLASS="${1}"
42-
grep -R -l --include "*.py" " ${CLASS}(" pandas/tests | xargs grep -n "pd\.${CLASS}("
41+
local -r CLASS=${1}
42+
grep -R -l --include "*.py" " ${CLASS}(" pandas/tests | xargs grep -n "pd\.${CLASS}[(\.]"
4343
test $? -gt 0
4444
}
4545

@@ -146,7 +146,7 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then
146146
RET=$(($RET + $?)) ; echo $MSG "DONE"
147147

148148
MSG='Check for inconsistent use of pandas namespace in tests' ; echo $MSG
149-
for class in "Series" "DataFrame" "Index"; do
149+
for class in "Series" "DataFrame" "Index" "MultiIndex" "Timestamp" "Timedelta" "TimedeltaIndex" "DatetimeIndex" "Categorical"; do
150150
check_namespace ${class}
151151
RET=$(($RET + $?))
152152
done

ci/run_tests.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ fi
2222

2323
PYTEST_CMD="${XVFB}pytest -m \"$PATTERN\" -n $PYTEST_WORKERS --dist=loadfile -s --strict --durations=30 --junitxml=test-data.xml $TEST_ARGS $COVERAGE pandas"
2424

25+
if [[ $(uname) != "Linux" && $(uname) != "Darwin" ]]; then
26+
# GH#37455 windows py38 build appears to be running out of memory
27+
# skip collection of window tests
28+
PYTEST_CMD="$PYTEST_CMD --ignore=pandas/tests/window/"
29+
fi
30+
2531
echo $PYTEST_CMD
2632
sh -c "$PYTEST_CMD"
2733

doc/source/development/contributing.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -837,8 +837,14 @@ to run its checks by running::
837837

838838
without having to have done ``pre-commit install`` beforehand.
839839

840-
Note that if you have conflicting installations of ``virtualenv``, then you may get an
841-
error - see `here <https://github.com/pypa/virtualenv/issues/1875>`_.
840+
.. note::
841+
842+
If you have conflicting installations of ``virtualenv``, then you may get an
843+
error - see `here <https://github.com/pypa/virtualenv/issues/1875>`_.
844+
845+
Also, due to a `bug in virtualenv <https://github.com/pypa/virtualenv/issues/1986>`_,
846+
you may run into issues if you're using conda. To solve this, you can downgrade
847+
``virtualenv`` to version ``20.0.33``.
842848

843849
Backwards compatibility
844850
~~~~~~~~~~~~~~~~~~~~~~~

doc/source/user_guide/computation.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,10 @@ The list of recognized types are the `scipy.signal window functions
451451
* ``slepian`` (needs width)
452452
* ``exponential`` (needs tau).
453453

454+
.. versionadded:: 1.2.0
455+
456+
All Scipy window types, concurrent with your installed version, are recognized ``win_types``.
457+
454458
.. ipython:: python
455459
456460
ser = pd.Series(np.random.randn(10), index=pd.date_range("1/1/2000", periods=10))

doc/source/whatsnew/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Version 1.1
2424
.. toctree::
2525
:maxdepth: 2
2626

27+
v1.1.5
2728
v1.1.4
2829
v1.1.3
2930
v1.1.2

doc/source/whatsnew/v1.1.4.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ Bug fixes
5252
Contributors
5353
~~~~~~~~~~~~
5454

55-
.. contributors:: v1.1.3..v1.1.4|HEAD
55+
.. contributors:: v1.1.3..v1.1.4

doc/source/whatsnew/v1.1.5.rst

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
.. _whatsnew_115:
2+
3+
What's new in 1.1.5 (??)
4+
------------------------
5+
6+
These are the changes in pandas 1.1.5. See :ref:`release` for a full changelog
7+
including other versions of pandas.
8+
9+
{{ header }}
10+
11+
.. ---------------------------------------------------------------------------
12+
13+
.. _whatsnew_115.regressions:
14+
15+
Fixed regressions
16+
~~~~~~~~~~~~~~~~~
17+
-
18+
-
19+
20+
.. ---------------------------------------------------------------------------
21+
22+
.. _whatsnew_115.bug_fixes:
23+
24+
Bug fixes
25+
~~~~~~~~~
26+
-
27+
-
28+
29+
.. ---------------------------------------------------------------------------
30+
31+
.. _whatsnew_115.contributors:
32+
33+
Contributors
34+
~~~~~~~~~~~~
35+
36+
.. contributors:: v1.1.4..v1.1.5|HEAD

doc/source/whatsnew/v1.2.0.rst

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,13 @@ Other enhancements
221221
- Where possible :meth:`RangeIndex.difference` and :meth:`RangeIndex.symmetric_difference` will return :class:`RangeIndex` instead of :class:`Int64Index` (:issue:`36564`)
222222
- Added :meth:`Rolling.sem()` and :meth:`Expanding.sem()` to compute the standard error of mean (:issue:`26476`).
223223
- :meth:`Rolling.var()` and :meth:`Rolling.std()` use Kahan summation and Welfords Method to avoid numerical issues (:issue:`37051`)
224+
- :meth:`DataFrame.corr` and :meth:`DataFrame.cov` use Welfords Method to avoid numerical issues (:issue:`37448`)
224225
- :meth:`DataFrame.plot` now recognizes ``xlabel`` and ``ylabel`` arguments for plots of type ``scatter`` and ``hexbin`` (:issue:`37001`)
225226
- :class:`DataFrame` now supports ``divmod`` operation (:issue:`37165`)
226227
- :meth:`DataFrame.to_parquet` now returns a ``bytes`` object when no ``path`` argument is passed (:issue:`37105`)
227228
- :class:`Rolling` now supports the ``closed`` argument for fixed windows (:issue:`34315`)
228229
- :class:`DatetimeIndex` and :class:`Series` with ``datetime64`` or ``datetime64tz`` dtypes now support ``std`` (:issue:`37436`)
230+
- :class:`Window` now supports all Scipy window types in ``win_type`` with flexible keyword argument support (:issue:`34556`)
229231

230232
.. _whatsnew_120.api_breaking.python:
231233

@@ -308,6 +310,13 @@ Optional libraries below the lowest tested version may still work, but are not c
308310

309311
See :ref:`install.dependencies` and :ref:`install.optional_dependencies` for more.
310312

313+
.. _whatsnew_200.api.other:
314+
315+
Other API changes
316+
^^^^^^^^^^^^^^^^^
317+
318+
- Sorting in descending order is now stable for :meth:`Series.sort_values` and :meth:`Index.sort_values` for DateTime-like :class:`Index` subclasses. This will affect sort order when sorting :class:`DataFrame` on multiple columns, sorting with a key function that produces duplicates, or requesting the sorting index when using :meth:`Index.sort_values`. When using :meth:`Series.value_counts`, count of missing values is no longer the last in the list of duplicate counts, and its position corresponds to the position in the original :class:`Series`. When using :meth:`Index.sort_values` for DateTime-like :class:`Index` subclasses, NaTs ignored the ``na_position`` argument and were sorted to the beggining. Now they respect ``na_position``, the default being ``last``, same as other :class:`Index` subclasses. (:issue:`35992`)
319+
311320
.. ---------------------------------------------------------------------------
312321
313322
.. _whatsnew_120.deprecations:
@@ -328,6 +337,7 @@ Deprecations
328337
- :meth:`Rolling.count` with ``min_periods=None`` will default to the size of the window in a future version (:issue:`31302`)
329338
- Deprecated slice-indexing on timezone-aware :class:`DatetimeIndex` with naive ``datetime`` objects, to match scalar indexing behavior (:issue:`36148`)
330339
- :meth:`Index.ravel` returning a ``np.ndarray`` is deprecated, in the future this will return a view on the same index (:issue:`19956`)
340+
- Deprecate use of strings denoting units with 'M', 'Y' or 'y' in :func:`~pandas.to_timedelta` (:issue:`36666`)
331341

332342
.. ---------------------------------------------------------------------------
333343
@@ -379,6 +389,7 @@ Datetimelike
379389
- :class:`Timestamp` and :class:`DatetimeIndex` comparisons between timezone-aware and timezone-naive objects now follow the standard library ``datetime`` behavior, returning ``True``/``False`` for ``!=``/``==`` and raising for inequality comparisons (:issue:`28507`)
380390
- Bug in :meth:`DatetimeIndex.equals` and :meth:`TimedeltaIndex.equals` incorrectly considering ``int64`` indexes as equal (:issue:`36744`)
381391
- Bug in :meth:`TimedeltaIndex.sum` and :meth:`Series.sum` with ``timedelta64`` dtype on an empty index or series returning ``NaT`` instead of ``Timedelta(0)`` (:issue:`31751`)
392+
- Bug in :meth:`DatetimeArray.shift` incorrectly allowing ``fill_value`` with a mismatched timezone (:issue:`37299`)
382393

383394
Timedelta
384395
^^^^^^^^^
@@ -424,7 +435,7 @@ Strings
424435

425436
Interval
426437
^^^^^^^^
427-
438+
- Bug in :meth:`IntervalIndex.take` with negative indices and ``fill_value=None`` (:issue:`37330`)
428439
-
429440
-
430441

@@ -440,6 +451,7 @@ Indexing
440451
- Bug in :meth:`DataFrame.__getitem__` and :meth:`DataFrame.loc.__getitem__` with :class:`IntervalIndex` columns and a numeric indexer (:issue:`26490`)
441452
- Bug in :meth:`Series.loc.__getitem__` with a non-unique :class:`MultiIndex` and an empty-list indexer (:issue:`13691`)
442453
- Bug in indexing on a :class:`Series` or :class:`DataFrame` with a :class:`MultiIndex` with a level named "0" (:issue:`37194`)
454+
- Bug in :meth:`Series.__getitem__` when using an unsigned integer array as an indexer giving incorrect results or segfaulting instead of raising ``KeyError`` (:issue:`37218`)
443455

444456
Missing
445457
^^^^^^^
@@ -475,6 +487,7 @@ I/O
475487
- Bug in :meth:`DataFrame.to_html`, :meth:`DataFrame.to_string`, and :meth:`DataFrame.to_latex` ignoring the ``na_rep`` argument when ``float_format`` was also specified (:issue:`9046`, :issue:`13828`)
476488
- Bug in output rendering of complex numbers showing too many trailing zeros (:issue:`36799`)
477489
- Bug in :class:`HDFStore` threw a ``TypeError`` when exporting an empty :class:`DataFrame` with ``datetime64[ns, tz]`` dtypes with a fixed HDF5 store (:issue:`20594`)
490+
- Bug in :class:`HDFStore` was dropping timezone information when exporting :class:`Series` with ``datetime64[ns, tz]`` dtypes with a fixed HDF5 store (:issue:`20594`)
478491

479492
Plotting
480493
^^^^^^^^
@@ -504,6 +517,8 @@ Groupby/resample/rolling
504517
- Bug in :meth:`DataFrameGroupBy.rolling` returned wrong values with timeaware window containing ``NaN``. Raises ``ValueError`` because windows are not monotonic now (:issue:`34617`)
505518
- Bug in :meth:`Rolling.__iter__` where a ``ValueError`` was not raised when ``min_periods`` was larger than ``window`` (:issue:`37156`)
506519
- Using :meth:`Rolling.var()` instead of :meth:`Rolling.std()` avoids numerical issues for :meth:`Rolling.corr()` when :meth:`Rolling.var()` is still within floating point precision while :meth:`Rolling.std()` is not (:issue:`31286`)
520+
- Bug in :meth:`df.groupby(..).quantile() <pandas.core.groupby.DataFrameGroupBy.quantile>` and :meth:`df.resample(..).quantile() <pandas.core.resample.Resampler.quantile>` raised ``TypeError`` when values were of type ``Timedelta`` (:issue:`29485`)
521+
- Bug in :meth:`Rolling.median` and :meth:`Rolling.quantile` returned wrong values for :class:`BaseIndexer` subclasses with non-monotonic starting or ending points for windows (:issue:`37153`)
507522

508523
Reshaping
509524
^^^^^^^^^
@@ -513,6 +528,7 @@ Reshaping
513528
- Bug in func :meth:`crosstab` when using multiple columns with ``margins=True`` and ``normalize=True`` (:issue:`35144`)
514529
- Bug in :meth:`DataFrame.agg` with ``func={'name':<FUNC>}`` incorrectly raising ``TypeError`` when ``DataFrame.columns==['Name']`` (:issue:`36212`)
515530
- Bug in :meth:`Series.transform` would give incorrect results or raise when the argument ``func`` was dictionary (:issue:`35811`)
531+
- Bug in :meth:`DataFrame.pivot` did not preserve :class:`MultiIndex` level names for columns when rows and columns both multiindexed (:issue:`36360`)
516532
- Bug in :func:`join` returned a non deterministic level-order for the resulting :class:`MultiIndex` (:issue:`36910`)
517533
-
518534

0 commit comments

Comments
 (0)