Skip to content

Commit 1100877

Browse files
committed
merge with upstream
2 parents dcc3efd + 8b58334 commit 1100877

File tree

283 files changed

+4698
-6359
lines changed

Some content is hidden

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

283 files changed

+4698
-6359
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: "Update pre-commit config"
2+
3+
on:
4+
schedule:
5+
- cron: "0 7 * * 1" # At 07:00 on each Monday.
6+
workflow_dispatch:
7+
8+
jobs:
9+
update-pre-commit:
10+
if: github.repository_owner == 'pandas-dev'
11+
name: Autoupdate pre-commit config
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Set up Python
15+
uses: actions/setup-python@v2
16+
- name: Cache multiple paths
17+
uses: actions/cache@v2
18+
with:
19+
path: |
20+
~/.cache/pre-commit
21+
~/.cache/pip
22+
key: pre-commit-autoupdate-${{ runner.os }}-build
23+
- name: Update pre-commit config packages
24+
uses: technote-space/create-pr-action@v2
25+
with:
26+
GITHUB_TOKEN: ${{ secrets.ACTION_TRIGGER_TOKEN }}
27+
EXECUTE_COMMANDS: |
28+
pip install pre-commit
29+
pre-commit autoupdate || (exit 0);
30+
pre-commit run -a || (exit 0);
31+
COMMIT_MESSAGE: "⬆️ UPGRADE: Autoupdate pre-commit config"
32+
PR_BRANCH_NAME: "pre-commit-config-update-${PR_ID}"
33+
PR_TITLE: "⬆️ UPGRADE: Autoupdate pre-commit config"

.pre-commit-config.yaml

+15-7
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ repos:
1818
types: [text]
1919
args: [--append-config=flake8/cython-template.cfg]
2020
- repo: https://github.com/PyCQA/isort
21-
rev: 5.6.3
21+
rev: 5.6.4
2222
hooks:
2323
- id: isort
2424
name: isort (python)
2525
- id: isort
2626
name: isort (cython)
2727
types: [cython]
2828
- repo: https://github.com/asottile/pyupgrade
29-
rev: v2.7.2
29+
rev: v2.7.3
3030
hooks:
3131
- id: pyupgrade
3232
args: [--py37-plus]
@@ -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
@@ -104,19 +112,19 @@ repos:
104112
language: python
105113
entry: python scripts/validate_unwanted_patterns.py --validation-type="private_import_across_module"
106114
types: [python]
107-
exclude: ^(asv_bench|pandas/_vendored|pandas/tests|doc)/
115+
exclude: ^(asv_bench|pandas/tests|doc)/
108116
- id: unwanted-patterns-private-function-across-module
109117
name: Check for use of private functions across modules
110118
language: python
111119
entry: python scripts/validate_unwanted_patterns.py --validation-type="private_function_across_module"
112120
types: [python]
113-
exclude: ^(asv_bench|pandas/_vendored|pandas/tests|doc)/
121+
exclude: ^(asv_bench|pandas/tests|doc)/
114122
- repo: https://github.com/asottile/yesqa
115123
rev: v1.2.2
116124
hooks:
117125
- id: yesqa
118126
- repo: https://github.com/pre-commit/pre-commit-hooks
119-
rev: v3.2.0
127+
rev: v3.3.0
120128
hooks:
121129
- id: end-of-file-fixer
122130
exclude: ^LICENSES/|\.(html|csv|txt|svg|py)$

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ check:
3030
python3 scripts/validate_unwanted_patterns.py \
3131
--validation-type="private_function_across_module" \
3232
--included-file-extensions="py" \
33-
--excluded-file-paths=pandas/tests,asv_bench/,pandas/_vendored \
33+
--excluded-file-paths=pandas/tests,asv_bench/ \
3434
pandas/
3535

3636
python3 scripts/validate_unwanted_patterns.py \
3737
--validation-type="private_import_across_module" \
3838
--included-file-extensions="py" \
39-
--excluded-file-paths=pandas/tests,asv_bench/,pandas/_vendored,doc/
39+
--excluded-file-paths=pandas/tests,asv_bench/,doc/
4040
pandas/

ci/azure/windows.yml

+1-1
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

+3-3
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

+6
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

+8-2
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

+4
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/user_guide/indexing.rst

+4-8
Original file line numberDiff line numberDiff line change
@@ -1594,19 +1594,16 @@ See :ref:`Advanced Indexing <advanced>` for usage of MultiIndexes.
15941594
Set operations on Index objects
15951595
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15961596

1597-
The two main operations are ``union (|)`` and ``intersection (&)``.
1598-
These can be directly called as instance methods or used via overloaded
1599-
operators. Difference is provided via the ``.difference()`` method.
1597+
The two main operations are ``union`` and ``intersection``.
1598+
Difference is provided via the ``.difference()`` method.
16001599

16011600
.. ipython:: python
16021601
16031602
a = pd.Index(['c', 'b', 'a'])
16041603
b = pd.Index(['c', 'e', 'd'])
1605-
a | b
1606-
a & b
16071604
a.difference(b)
16081605
1609-
Also available is the ``symmetric_difference (^)`` operation, which returns elements
1606+
Also available is the ``symmetric_difference`` operation, which returns elements
16101607
that appear in either ``idx1`` or ``idx2``, but not in both. This is
16111608
equivalent to the Index created by ``idx1.difference(idx2).union(idx2.difference(idx1))``,
16121609
with duplicates dropped.
@@ -1616,7 +1613,6 @@ with duplicates dropped.
16161613
idx1 = pd.Index([1, 2, 3, 4])
16171614
idx2 = pd.Index([2, 3, 4, 5])
16181615
idx1.symmetric_difference(idx2)
1619-
idx1 ^ idx2
16201616
16211617
.. note::
16221618

@@ -1631,7 +1627,7 @@ integer values are converted to float
16311627
16321628
idx1 = pd.Index([0, 1, 2])
16331629
idx2 = pd.Index([0.5, 1.5])
1634-
idx1 | idx2
1630+
idx1.union(idx2)
16351631
16361632
.. _indexing.missing:
16371633

doc/source/user_guide/missing_data.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ at the new values.
466466
ser = pd.Series(np.sort(np.random.uniform(size=100)))
467467
468468
# interpolate at new_index
469-
new_index = ser.index | pd.Index([49.25, 49.5, 49.75, 50.25, 50.5, 50.75])
469+
new_index = ser.index.union(pd.Index([49.25, 49.5, 49.75, 50.25, 50.5, 50.75]))
470470
interp_s = ser.reindex(new_index).interpolate(method="pchip")
471471
interp_s[49:51]
472472

doc/source/user_guide/timeseries.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ into ``freq`` keyword arguments. The available date offsets and associated frequ
879879
:header: "Date Offset", "Frequency String", "Description"
880880
:widths: 15, 15, 65
881881

882-
:class:`~pandas.tseries.offsets.DateOffset`, None, "Generic offset class, defaults to 1 calendar day"
882+
:class:`~pandas.tseries.offsets.DateOffset`, None, "Generic offset class, defaults to absolute 24 hours"
883883
:class:`~pandas.tseries.offsets.BDay` or :class:`~pandas.tseries.offsets.BusinessDay`, ``'B'``,"business day (weekday)"
884884
:class:`~pandas.tseries.offsets.CDay` or :class:`~pandas.tseries.offsets.CustomBusinessDay`, ``'C'``, "custom business day"
885885
:class:`~pandas.tseries.offsets.Week`, ``'W'``, "one week, optionally anchored on a day of the week"

doc/source/whatsnew/index.rst

+1
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

+4-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ including other versions of pandas.
1515
Fixed regressions
1616
~~~~~~~~~~~~~~~~~
1717
- Fixed regression in :func:`read_csv` raising a ``ValueError`` when ``names`` was of type ``dict_keys`` (:issue:`36928`)
18+
- Fixed regression in :func:`read_csv` with more than 1M rows and specifying a ``index_col`` argument (:issue:`37094`)
1819
- Fixed regression where attempting to mutate a :class:`DateOffset` object would no longer raise an ``AttributeError`` (:issue:`36940`)
1920
- Fixed regression where :meth:`DataFrame.agg` would fail with :exc:`TypeError` when passed positional arguments to be passed on to the aggregation function (:issue:`36948`).
2021
- Fixed regression in :class:`RollingGroupby` with ``sort=False`` not being respected (:issue:`36889`)
@@ -28,7 +29,9 @@ Fixed regressions
2829
- Fixed regression in certain offsets (:meth:`pd.offsets.Day() <pandas.tseries.offsets.Day>` and below) no longer being hashable (:issue:`37267`)
2930
- Fixed regression in :class:`StataReader` which required ``chunksize`` to be manually set when using an iterator to read a dataset (:issue:`37280`)
3031
- Fixed regression in setitem with :meth:`DataFrame.iloc` which raised error when trying to set a value while filtering with a boolean list (:issue:`36741`)
32+
- Fixed regression in setitem with a Series getting aligned before setting the values (:issue:`37427`)
3133
- Fixed regression in :attr:`MultiIndex.is_monotonic_increasing` returning wrong results with ``NaN`` in at least one of the levels (:issue:`37220`)
34+
- Fixed regression in inplace arithmetic operation on a Series not updating the parent DataFrame (:issue:`36373`)
3235

3336
.. ---------------------------------------------------------------------------
3437
@@ -49,4 +52,4 @@ Bug fixes
4952
Contributors
5053
~~~~~~~~~~~~
5154

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

doc/source/whatsnew/v1.1.5.rst

+36
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

0 commit comments

Comments
 (0)