Skip to content

Commit f41f475

Browse files
Merge remote-tracking branch 'upstream/main' into bisect
2 parents 9f5fff4 + afc06e7 commit f41f475

File tree

170 files changed

+2532
-1836
lines changed

Some content is hidden

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

170 files changed

+2532
-1836
lines changed

.github/workflows/code-checks.yml

+24
Original file line numberDiff line numberDiff line change
@@ -156,3 +156,27 @@ jobs:
156156
name: Benchmarks log
157157
path: asv_bench/benchmarks.log
158158
if: failure()
159+
160+
build_docker_dev_environment:
161+
name: Build Docker Dev Environment
162+
runs-on: ubuntu-latest
163+
defaults:
164+
run:
165+
shell: bash -l {0}
166+
167+
concurrency:
168+
# https://github.community/t/concurrecy-not-work-for-push/183068/7
169+
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-build_docker_dev_environment
170+
cancel-in-progress: true
171+
172+
steps:
173+
- name: Clean up dangling images
174+
run: docker image prune -f
175+
176+
- name: Checkout
177+
uses: actions/checkout@v2
178+
with:
179+
fetch-depth: 0
180+
181+
- name: Build image
182+
run: docker build --pull --no-cache --tag pandas-dev-env .

.github/workflows/datamanger.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
data_manager:
2121
name: Test experimental data manager
2222
runs-on: ubuntu-latest
23+
timeout-minutes: 120
2324
services:
2425
moto:
2526
image: motoserver/moto
@@ -45,7 +46,7 @@ jobs:
4546
- name: Run tests
4647
env:
4748
PANDAS_DATA_MANAGER: array
48-
PATTERN: "not network and not clipboard"
49+
PATTERN: "not network and not clipboard and not single_cpu"
4950
PYTEST_WORKERS: "auto"
5051
PYTEST_TARGET: pandas
5152
run: |

.github/workflows/posix.yml

+39-25
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ on:
1313
- "doc/**"
1414

1515
env:
16-
PYTEST_WORKERS: "auto"
1716
PANDAS_CI: 1
1817

1918
jobs:
@@ -22,35 +21,51 @@ jobs:
2221
defaults:
2322
run:
2423
shell: bash -l {0}
24+
timeout-minutes: 120
2525
strategy:
2626
matrix:
27-
settings: [
28-
[actions-38-downstream_compat.yaml, "not slow and not network", "", "", "", "", ""],
29-
[actions-38-minimum_versions.yaml, "", "", "", "", "", ""],
30-
[actions-38.yaml, "not slow and not network", "language-pack-it", "it_IT.utf8", "it_IT.utf8", "", ""],
31-
[actions-38.yaml, "not slow and not network", "language-pack-zh-hans", "zh_CN.utf8", "zh_CN.utf8", "", ""],
32-
[actions-38.yaml, "", "", "", "", "", ""],
33-
[actions-pypy-38.yaml, "not slow", "", "", "", "", "--max-worker-restart 0"],
34-
[actions-39.yaml, "", "", "", "", "", ""],
35-
[actions-310-numpydev.yaml, "not slow and not network", "", "", "", "deprecate", "-W error"],
36-
[actions-310.yaml, "", "", "", "", "", ""],
37-
]
27+
env_file: [actions-38.yaml, actions-39.yaml, actions-310.yaml]
28+
pattern: ["not single_cpu", "single_cpu"]
29+
include:
30+
- env_file: actions-38-downstream_compat.yaml
31+
pattern: "not slow and not network and not single_cpu"
32+
pytest_target: "pandas/tests/test_downstream.py"
33+
- env_file: actions-38-minimum_versions.yaml
34+
pattern: "not slow and not network and not single_cpu"
35+
- env_file: actions-38.yaml
36+
pattern: "not slow and not network and not single_cpu"
37+
extra_apt: "language-pack-it"
38+
lang: "it_IT.utf8"
39+
lc_all: "it_IT.utf8"
40+
- env_file: actions-38.yaml
41+
pattern: "not slow and not network and not single_cpu"
42+
extra_apt: "language-pack-zh-hans"
43+
lang: "zh_CN.utf8"
44+
lc_all: "zh_CN.utf8"
45+
- env_file: actions-pypy-38.yaml
46+
pattern: "not slow and not network and not single_cpu"
47+
test_args: "--max-worker-restart 0"
48+
- env_file: actions-310-numpydev.yaml
49+
pattern: "not slow and not network and not single_cpu"
50+
pandas_testing_mode: "deprecate"
51+
test_args: "-W error"
3852
fail-fast: false
3953
env:
40-
ENV_FILE: ci/deps/${{ matrix.settings[0] }}
41-
PATTERN: ${{ matrix.settings[1] }}
42-
EXTRA_APT: ${{ matrix.settings[2] }}
43-
LANG: ${{ matrix.settings[3] }}
44-
LC_ALL: ${{ matrix.settings[4] }}
45-
PANDAS_TESTING_MODE: ${{ matrix.settings[5] }}
46-
TEST_ARGS: ${{ matrix.settings[6] }}
47-
PYTEST_TARGET: pandas
48-
IS_PYPY: ${{ contains(matrix.settings[0], 'pypy') }}
54+
ENV_FILE: ci/deps/${{ matrix.env_file }}
55+
PATTERN: ${{ matrix.pattern }}
56+
EXTRA_APT: ${{ matrix.extra_apt || '' }}
57+
LANG: ${{ matrix.lang || '' }}
58+
LC_ALL: ${{ matrix.lc_all || '' }}
59+
PANDAS_TESTING_MODE: ${{ matrix.pandas_testing_mode || '' }}
60+
TEST_ARGS: ${{ matrix.test_args || '' }}
61+
PYTEST_WORKERS: ${{ contains(matrix.pattern, 'not single_cpu') && 'auto' || '1' }}
62+
PYTEST_TARGET: ${{ matrix.pytest_target || 'pandas' }}
63+
IS_PYPY: ${{ contains(matrix.env_file, 'pypy') }}
4964
# TODO: re-enable coverage on pypy, its slow
50-
COVERAGE: ${{ !contains(matrix.settings[0], 'pypy') }}
65+
COVERAGE: ${{ !contains(matrix.env_file, 'pypy') }}
5166
concurrency:
5267
# https://github.community/t/concurrecy-not-work-for-push/183068/7
53-
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.settings[0] }}-${{ matrix.settings[1] }}-${{ matrix.settings[2] }}
68+
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.env_file }}-${{ matrix.pattern }}-${{ matrix.extra_apt || '' }}
5469
cancel-in-progress: true
5570

5671
services:
@@ -128,8 +143,7 @@ jobs:
128143
shell: bash
129144
run: |
130145
# TODO: re-enable cov, its slowing the tests down though
131-
# TODO: Unpin Cython, the new Cython 0.29.26 is causing compilation errors
132-
pip install Cython==0.29.25 numpy python-dateutil pytz pytest>=6.0 pytest-xdist>=1.31.0 hypothesis>=5.5.3
146+
pip install Cython numpy python-dateutil pytz pytest>=6.0 pytest-xdist>=1.31.0 hypothesis>=5.5.3
133147
if: ${{ env.IS_PYPY == 'true' }}
134148

135149
- name: Build Pandas

.github/workflows/python-dev.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ on:
2323
env:
2424
PYTEST_WORKERS: "auto"
2525
PANDAS_CI: 1
26-
PATTERN: "not slow and not network and not clipboard"
26+
PATTERN: "not slow and not network and not clipboard and not single_cpu"
2727
COVERAGE: true
2828
PYTEST_TARGET: pandas
2929

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM quay.io/condaforge/miniforge3
1+
FROM quay.io/condaforge/miniforge3:4.11.0-0
22

33
# if you forked pandas, you can pass in your own GitHub username to use your fork
44
# i.e. gh_username=myname
@@ -45,4 +45,4 @@ RUN . /opt/conda/etc/profile.d/conda.sh \
4545
&& cd "$pandas_home" \
4646
&& export \
4747
&& python setup.py build_ext -j 4 \
48-
&& python -m pip install -e .
48+
&& python -m pip install --no-build-isolation -e .

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ or alternatively
136136
python setup.py develop
137137
```
138138

139-
See the full instructions for [installing from source](https://pandas.pydata.org/pandas-docs/stable/install.html#installing-from-source).
139+
See the full instructions for [installing from source](https://pandas.pydata.org/pandas-docs/stable/getting_started/install.html#installing-from-source).
140140

141141
## License
142142
[BSD 3](LICENSE)

asv_bench/benchmarks/multiindex_object.py

+23
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,29 @@ def time_small_get_loc_warm(self):
4747
self.mi_small.get_loc((99, "A", "A"))
4848

4949

50+
class GetLocs:
51+
def setup(self):
52+
self.mi_large = MultiIndex.from_product(
53+
[np.arange(1000), np.arange(20), list(string.ascii_letters)],
54+
names=["one", "two", "three"],
55+
)
56+
self.mi_med = MultiIndex.from_product(
57+
[np.arange(1000), np.arange(10), list("A")], names=["one", "two", "three"]
58+
)
59+
self.mi_small = MultiIndex.from_product(
60+
[np.arange(100), list("A"), list("A")], names=["one", "two", "three"]
61+
)
62+
63+
def time_large_get_locs(self):
64+
self.mi_large.get_locs([999, 19, "Z"])
65+
66+
def time_med_get_locs(self):
67+
self.mi_med.get_locs([999, 9, "A"])
68+
69+
def time_small_get_locs(self):
70+
self.mi_small.get_locs([99, "A", "A"])
71+
72+
5073
class Duplicates:
5174
def setup(self):
5275
size = 65536

azure-pipelines.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pr:
1818
variables:
1919
PYTEST_WORKERS: auto
2020
PYTEST_TARGET: pandas
21-
PATTERN: "not slow and not high_memory and not db and not network"
21+
PATTERN: "not slow and not high_memory and not db and not network and not single_cpu"
2222
PANDAS_CI: 1
2323

2424
jobs:

ci/azure/posix.yml

+6-24
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,22 @@ parameters:
44

55
jobs:
66
- job: ${{ parameters.name }}
7+
timeoutInMinutes: 90
78
pool:
89
vmImage: ${{ parameters.vmImage }}
910
strategy:
1011
matrix:
11-
py38_macos_1:
12+
py38:
1213
ENV_FILE: ci/deps/azure-macos-38.yaml
1314
CONDA_PY: "38"
14-
PATTERN: "not slow"
15-
PYTEST_TARGET: "pandas/tests/[a-h]*"
16-
py38_macos_2:
17-
ENV_FILE: ci/deps/azure-macos-38.yaml
18-
CONDA_PY: "38"
19-
PATTERN: "not slow"
20-
PYTEST_TARGET: "pandas/tests/[i-z]*"
21-
py39_macos_1:
22-
ENV_FILE: ci/deps/azure-macos-39.yaml
23-
CONDA_PY: "39"
24-
PATTERN: "not slow"
25-
PYTEST_TARGET: "pandas/tests/[a-h]*"
26-
py39_macos_2:
15+
16+
py39:
2717
ENV_FILE: ci/deps/azure-macos-39.yaml
2818
CONDA_PY: "39"
29-
PATTERN: "not slow"
30-
PYTEST_TARGET: "pandas/tests/[i-z]*"
31-
py310_macos_1:
32-
ENV_FILE: ci/deps/azure-macos-310.yaml
33-
CONDA_PY: "310"
34-
PATTERN: "not slow"
35-
PYTEST_TARGET: "pandas/tests/[a-h]*"
36-
py310_macos_2:
19+
20+
py310:
3721
ENV_FILE: ci/deps/azure-macos-310.yaml
3822
CONDA_PY: "310"
39-
PATTERN: "not slow"
40-
PYTEST_TARGET: "pandas/tests/[i-z]*"
4123

4224
steps:
4325
- script: echo '##vso[task.prependpath]$(HOME)/miniconda3/bin'

ci/deps/actions-38-minimum_versions.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dependencies:
1919
- numpy=1.18.5
2020
- pytz=2020.1
2121

22-
# optional dependencies
22+
# optional dependencies, markupsafe for jinja2
2323
- beautifulsoup4=4.8.2
2424
- blosc=1.20.1
2525
- bottleneck=1.3.1
@@ -29,6 +29,7 @@ dependencies:
2929
- gcsfs=0.6.0
3030
- jinja2=2.11
3131
- lxml=4.5.0
32+
- markupsafe=2.0.1
3233
- matplotlib=3.3.2
3334
- numba=0.50.1
3435
- numexpr=2.7.1

doc/source/user_guide/io.rst

+4
Original file line numberDiff line numberDiff line change
@@ -3675,6 +3675,10 @@ should be passed to ``index_col`` and ``header``:
36753675
36763676
os.remove("path_to_file.xlsx")
36773677
3678+
Missing values in columns specified in ``index_col`` will be forward filled to
3679+
allow roundtripping with ``to_excel`` for ``merged_cells=True``. To avoid forward
3680+
filling the missing values use ``set_index`` after reading the data instead of
3681+
``index_col``.
36783682

36793683
Parsing specific columns
36803684
++++++++++++++++++++++++

doc/source/whatsnew/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Version 1.4
2424
.. toctree::
2525
:maxdepth: 2
2626

27+
v1.4.2
2728
v1.4.1
2829
v1.4.0
2930

doc/source/whatsnew/v1.4.0.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -637,11 +637,11 @@ will continue to return :class:`Int64Index`, :class:`UInt64Index` and
637637
638638
.. _whatsnew_140.deprecations.frame_series_append:
639639

640-
Deprecated Frame.append and Series.append
641-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
640+
Deprecated DataFrame.append and Series.append
641+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
642642

643643
:meth:`DataFrame.append` and :meth:`Series.append` have been deprecated and will
644-
be removed in Pandas 2.0. Use :func:`pandas.concat` instead (:issue:`35407`).
644+
be removed in a future version. Use :func:`pandas.concat` instead (:issue:`35407`).
645645

646646
*Deprecated syntax*
647647

doc/source/whatsnew/v1.4.1.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,4 @@ Other
5353
Contributors
5454
~~~~~~~~~~~~
5555

56-
.. contributors:: v1.4.0..v1.4.1|HEAD
56+
.. contributors:: v1.4.0..v1.4.1

doc/source/whatsnew/v1.4.2.rst

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
.. _whatsnew_142:
2+
3+
What's new in 1.4.2 (March ??, 2022)
4+
------------------------------------
5+
6+
These are the changes in pandas 1.4.2. See :ref:`release` for a full changelog
7+
including other versions of pandas.
8+
9+
{{ header }}
10+
11+
.. ---------------------------------------------------------------------------
12+
13+
.. _whatsnew_142.regressions:
14+
15+
Fixed regressions
16+
~~~~~~~~~~~~~~~~~
17+
- Fixed regression in :meth:`DataFrame.drop` and :meth:`Series.drop` when :class:`Index` had extension dtype and duplicates (:issue:`45860`)
18+
-
19+
20+
.. ---------------------------------------------------------------------------
21+
22+
.. _whatsnew_142.bug_fixes:
23+
24+
Bug fixes
25+
~~~~~~~~~
26+
-
27+
-
28+
29+
.. ---------------------------------------------------------------------------
30+
31+
.. _whatsnew_142.other:
32+
33+
Other
34+
~~~~~
35+
-
36+
-
37+
38+
.. ---------------------------------------------------------------------------
39+
40+
.. _whatsnew_142.contributors:
41+
42+
Contributors
43+
~~~~~~~~~~~~
44+
45+
.. contributors:: v1.4.1..v1.4.2|HEAD

0 commit comments

Comments
 (0)