Skip to content

Commit 88bc59c

Browse files
authored
Merge branch 'main' into include-pyproject
2 parents fbeb676 + d859ecc commit 88bc59c

File tree

199 files changed

+3073
-1999
lines changed

Some content is hidden

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

199 files changed

+3073
-1999
lines changed

.github/actions/setup-conda/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ runs:
1818
- name: Set Arrow version in ${{ inputs.environment-file }} to ${{ inputs.pyarrow-version }}
1919
run: |
2020
grep -q ' - pyarrow' ${{ inputs.environment-file }}
21-
sed -i"" -e "s/ - pyarrow<10/ - pyarrow=${{ inputs.pyarrow-version }}/" ${{ inputs.environment-file }}
21+
sed -i"" -e "s/ - pyarrow/ - pyarrow=${{ inputs.pyarrow-version }}/" ${{ inputs.environment-file }}
2222
cat ${{ inputs.environment-file }}
2323
shell: bash
2424
if: ${{ inputs.pyarrow-version }}

.github/workflows/docbuild-and-upload.yml

+7
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ on:
1515
env:
1616
ENV_FILE: environment.yml
1717
PANDAS_CI: 1
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1819

1920
permissions:
2021
contents: read
@@ -45,6 +46,12 @@ jobs:
4546
- name: Build Pandas
4647
uses: ./.github/actions/build_pandas
4748

49+
- name: Set up maintainers cache
50+
uses: actions/cache@v3
51+
with:
52+
path: maintainers.json
53+
key: maintainers
54+
4855
- name: Build website
4956
run: python web/pandas_web.py web/pandas --target-path=web/build
5057

.github/workflows/macos-windows.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ env:
1616
PANDAS_CI: 1
1717
PYTEST_TARGET: pandas
1818
PATTERN: "not slow and not db and not network and not single_cpu"
19+
ERROR_ON_WARNINGS: "1"
1920

2021

2122
permissions:
@@ -52,7 +53,7 @@ jobs:
5253
uses: ./.github/actions/setup-conda
5354
with:
5455
environment-file: ci/deps/${{ matrix.env_file }}
55-
pyarrow-version: ${{ matrix.os == 'macos-latest' && '6' || '' }}
56+
pyarrow-version: ${{ matrix.os == 'macos-latest' && '9' || '' }}
5657

5758
- name: Build Pandas
5859
uses: ./.github/actions/build_pandas

.github/workflows/ubuntu.yml

+17-7
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
matrix:
3030
env_file: [actions-38.yaml, actions-39.yaml, actions-310.yaml]
3131
pattern: ["not single_cpu", "single_cpu"]
32-
pyarrow_version: ["7", "8", "9"]
32+
pyarrow_version: ["7", "8", "9", "10"]
3333
include:
3434
- name: "Downstream Compat"
3535
env_file: actions-38-downstream_compat.yaml
@@ -38,6 +38,7 @@ jobs:
3838
- name: "Minimum Versions"
3939
env_file: actions-38-minimum_versions.yaml
4040
pattern: "not slow and not network and not single_cpu"
41+
error_on_warnings: "0"
4142
- name: "Locale: it_IT"
4243
env_file: actions-38.yaml
4344
pattern: "not slow and not network and not single_cpu"
@@ -62,33 +63,42 @@ jobs:
6263
env_file: actions-310.yaml
6364
pattern: "not slow and not network and not single_cpu"
6465
pandas_copy_on_write: "1"
66+
error_on_warnings: "0"
6567
- name: "Data Manager"
6668
env_file: actions-38.yaml
6769
pattern: "not slow and not network and not single_cpu"
6870
pandas_data_manager: "array"
71+
error_on_warnings: "0"
6972
- name: "Pypy"
7073
env_file: actions-pypy-38.yaml
7174
pattern: "not slow and not network and not single_cpu"
7275
test_args: "--max-worker-restart 0"
76+
error_on_warnings: "0"
7377
- name: "Numpy Dev"
7478
env_file: actions-310-numpydev.yaml
7579
pattern: "not slow and not network and not single_cpu"
7680
test_args: "-W error::DeprecationWarning:numpy -W error::FutureWarning:numpy"
81+
error_on_warnings: "0"
7782
exclude:
78-
- env_file: actions-39.yaml
79-
pyarrow_version: "6"
80-
- env_file: actions-39.yaml
83+
- env_file: actions-38.yaml
8184
pyarrow_version: "7"
82-
- env_file: actions-310.yaml
83-
pyarrow_version: "6"
84-
- env_file: actions-310.yaml
85+
- env_file: actions-38.yaml
86+
pyarrow_version: "8"
87+
- env_file: actions-38.yaml
88+
pyarrow_version: "9"
89+
- env_file: actions-39.yaml
8590
pyarrow_version: "7"
91+
- env_file: actions-39.yaml
92+
pyarrow_version: "8"
93+
- env_file: actions-39.yaml
94+
pyarrow_version: "9"
8695
fail-fast: false
8796
name: ${{ matrix.name || format('{0} pyarrow={1} {2}', matrix.env_file, matrix.pyarrow_version, matrix.pattern) }}
8897
env:
8998
ENV_FILE: ci/deps/${{ matrix.env_file }}
9099
PATTERN: ${{ matrix.pattern }}
91100
EXTRA_APT: ${{ matrix.extra_apt || '' }}
101+
ERROR_ON_WARNINGS: ${{ matrix.error_on_warnings || '1' }}
92102
LANG: ${{ matrix.lang || '' }}
93103
LC_ALL: ${{ matrix.lc_all || '' }}
94104
PANDAS_DATA_MANAGER: ${{ matrix.pandas_data_manager || 'block' }}

.pre-commit-config.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -333,3 +333,12 @@ repos:
333333
additional_dependencies:
334334
- autotyping==22.9.0
335335
- libcst==0.4.7
336+
- id: check-test-naming
337+
name: check that test names start with 'test'
338+
entry: python -m scripts.check_test_naming
339+
types: [python]
340+
files: ^pandas/tests
341+
language: python
342+
exclude: |
343+
(?x)
344+
^pandas/tests/generic/test_generic.py # GH50380

ci/deps/actions-310.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ dependencies:
4242
- psycopg2
4343
- pymysql
4444
- pytables
45-
- pyarrow<10
45+
- pyarrow
4646
- pyreadstat
4747
- python-snappy
4848
- pyxlsb

ci/deps/actions-38-downstream_compat.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ dependencies:
4040
- openpyxl
4141
- odfpy
4242
- psycopg2
43-
- pyarrow<10
43+
- pyarrow
4444
- pymysql
4545
- pyreadstat
4646
- pytables

ci/deps/actions-38.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ dependencies:
4040
- odfpy
4141
- pandas-gbq
4242
- psycopg2
43-
- pyarrow<10
43+
- pyarrow
4444
- pymysql
4545
- pyreadstat
4646
- pytables

ci/deps/actions-39.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ dependencies:
4141
- pandas-gbq
4242
- psycopg2
4343
- pymysql
44-
- pyarrow<10
44+
- pyarrow
4545
- pyreadstat
4646
- pytables
4747
- python-snappy

ci/deps/circle-38-arm64.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ dependencies:
4040
- odfpy
4141
- pandas-gbq
4242
- psycopg2
43-
- pyarrow<10
43+
- pyarrow
4444
- pymysql
4545
# Not provided on ARM
4646
#- pyreadstat

ci/run_tests.sh

+7
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ if [[ "$PATTERN" ]]; then
3030
PYTEST_CMD="$PYTEST_CMD -m \"$PATTERN\""
3131
fi
3232

33+
if [[ "$ERROR_ON_WARNINGS" == "1" ]]; then
34+
for pth in $(find pandas -name '*.py' -not -path "pandas/tests/*" | sed -e 's/\.py//g' -e 's/\/__init__//g' -e 's/\//./g');
35+
do
36+
PYTEST_CMD="$PYTEST_CMD -W error:::$pth"
37+
done
38+
fi
39+
3340
echo $PYTEST_CMD
3441
sh -c "$PYTEST_CMD"
3542

doc/source/reference/indexing.rst

+1
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ MultiIndex components
298298
MultiIndex.swaplevel
299299
MultiIndex.reorder_levels
300300
MultiIndex.remove_unused_levels
301+
MultiIndex.drop
301302

302303
MultiIndex selecting
303304
~~~~~~~~~~~~~~~~~~~~

doc/source/user_guide/io.rst

+7-6
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,9 @@ parse_dates : boolean or list of ints or names or list of lists or dict, default
275275
infer_datetime_format : boolean, default ``False``
276276
If ``True`` and parse_dates is enabled for a column, attempt to infer the
277277
datetime format to speed up the processing.
278+
279+
.. deprecated:: 2.0.0
280+
A strict version of this argument is now the default, passing it has no effect.
278281
keep_date_col : boolean, default ``False``
279282
If ``True`` and parse_dates specifies combining multiple columns then keep the
280283
original columns.
@@ -916,12 +919,10 @@ an exception is raised, the next one is tried:
916919

917920
Note that performance-wise, you should try these methods of parsing dates in order:
918921

919-
1. Try to infer the format using ``infer_datetime_format=True`` (see section below).
920-
921-
2. If you know the format, use ``pd.to_datetime()``:
922+
1. If you know the format, use ``pd.to_datetime()``:
922923
``date_parser=lambda x: pd.to_datetime(x, format=...)``.
923924

924-
3. If you have a really non-standard format, use a custom ``date_parser`` function.
925+
2. If you have a really non-standard format, use a custom ``date_parser`` function.
925926
For optimal performance, this should be vectorized, i.e., it should accept arrays
926927
as arguments.
927928

@@ -1148,7 +1149,7 @@ To completely override the default values that are recognized as missing, specif
11481149
.. _io.navaluesconst:
11491150

11501151
The default ``NaN`` recognized values are ``['-1.#IND', '1.#QNAN', '1.#IND', '-1.#QNAN', '#N/A N/A', '#N/A', 'N/A',
1151-
'n/a', 'NA', '<NA>', '#NA', 'NULL', 'null', 'NaN', '-NaN', 'nan', '-nan', '']``.
1152+
'n/a', 'NA', '<NA>', '#NA', 'NULL', 'null', 'NaN', '-NaN', 'nan', '-nan', 'None', '']``.
11521153

11531154
Let us consider some examples:
11541155

@@ -3832,7 +3833,7 @@ OpenDocument Spreadsheets
38323833
The io methods for `Excel files`_ also support reading and writing OpenDocument spreadsheets
38333834
using the `odfpy <https://pypi.org/project/odfpy/>`__ module. The semantics and features for reading and writing
38343835
OpenDocument spreadsheets match what can be done for `Excel files`_ using
3835-
``engine='odf'``.
3836+
``engine='odf'``. The optional dependency 'odfpy' needs to be installed.
38363837

38373838
The :func:`~pandas.read_excel` method can read OpenDocument spreadsheets
38383839

0 commit comments

Comments
 (0)