Skip to content

Commit ad1a7b6

Browse files
Merge branch 'main' into web_benchmarks
2 parents 59fb94b + 488f6bd commit ad1a7b6

File tree

135 files changed

+1101
-672
lines changed

Some content is hidden

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

135 files changed

+1101
-672
lines changed

Diff for: .github/workflows/unit-tests.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ jobs:
9292
- name: "Numpy Dev"
9393
env_file: actions-311-numpydev.yaml
9494
pattern: "not slow and not network and not single_cpu"
95-
test_args: "-W error::DeprecationWarning -W error::FutureWarning"
95+
# Currently restricted the warnings that error to Deprecation Warnings from numpy
96+
# done since pyarrow isn't compatible with numpydev always
97+
# TODO: work with pyarrow to revert this?
98+
test_args: "-W error::DeprecationWarning:numpy -W error::FutureWarning:numpy"
9699
- name: "Pyarrow Nightly"
97100
env_file: actions-311-pyarrownightly.yaml
98101
pattern: "not slow and not network and not single_cpu"

Diff for: .pre-commit-config.yaml

+1-4
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ repos:
132132
types: [python]
133133
stages: [manual]
134134
additional_dependencies: &pyright_dependencies
135-
135+
136136
- id: pyright
137137
# note: assumes python env is setup and activated
138138
name: pyright reportGeneralTypeIssues
@@ -190,9 +190,6 @@ repos:
190190
# Check for deprecated messages without sphinx directive
191191
|(DEPRECATED|DEPRECATE|Deprecated)(:|,|\.)
192192
193-
# {foo!r} instead of {repr(foo)}
194-
|!r}
195-
196193
# builtin filter function
197194
|(?<!def)[\(\s]filter\(
198195
types_or: [python, cython, rst]

Diff for: LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ BSD 3-Clause License
33
Copyright (c) 2008-2011, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
44
All rights reserved.
55

6-
Copyright (c) 2011-2023, Open source contributors.
6+
Copyright (c) 2011-2024, Open source contributors.
77

88
Redistribution and use in source and binary forms, with or without
99
modification, are permitted provided that the following conditions are met:

Diff for: ci/code_checks.sh

+1-15
Original file line numberDiff line numberDiff line change
@@ -73,22 +73,8 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
7373
$BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=EX03 --ignore_functions \
7474
pandas.Series.plot.line \
7575
pandas.Series.to_sql \
76-
pandas.errors.SettingWithCopyWarning \
77-
pandas.errors.SpecificationError \
78-
pandas.errors.UndefinedVariableError \
7976
pandas.read_json \
80-
pandas.io.formats.style.Styler.to_latex \
81-
pandas.read_parquet \
82-
pandas.DataFrame.to_sql \
83-
pandas.io.formats.style.Styler.map \
84-
pandas.io.formats.style.Styler.apply_index \
85-
pandas.io.formats.style.Styler.map_index \
86-
pandas.io.formats.style.Styler.format \
87-
pandas.io.formats.style.Styler.highlight_quantile \
88-
pandas.io.formats.style.Styler.background_gradient \
89-
pandas.io.formats.style.Styler.text_gradient \
90-
pandas.DataFrame.plot.hexbin \
91-
pandas.DataFrame.plot.line
77+
pandas.DataFrame.to_sql # There should be no backslash in the final line, please keep this comment in the last ignored function
9278
RET=$(($RET + $?)) ; echo $MSG "DONE"
9379

9480
fi

Diff for: ci/deps/actions-39-minimum_versions.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dependencies:
2222

2323
# required dependencies
2424
- python-dateutil=2.8.2
25-
- numpy=1.22.4
25+
- numpy=1.23.5
2626
- pytz=2020.1
2727

2828
# optional dependencies

Diff for: doc/scripts/eval_performance.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def bench_with(n, times=10, repeat=3, engine="numexpr"):
1717
return (
1818
np.array(
1919
timeit(
20-
f"df.eval(s, engine={repr(engine)})",
20+
f"df.eval(s, engine={engine!r})",
2121
setup=setup_common % (n, setup_with),
2222
repeat=repeat,
2323
number=times,
@@ -34,7 +34,7 @@ def bench_subset(n, times=20, repeat=3, engine="numexpr"):
3434
return (
3535
np.array(
3636
timeit(
37-
f"df.query(s, engine={repr(engine)})",
37+
f"df.query(s, engine={engine!r})",
3838
setup=setup_common % (n, setup_subset),
3939
repeat=repeat,
4040
number=times,
@@ -55,7 +55,7 @@ def bench(mn=3, mx=7, num=100, engines=("python", "numexpr"), verbose=False):
5555
for engine in engines:
5656
for i, n in enumerate(r):
5757
if verbose & (i % 10 == 0):
58-
print(f"engine: {repr(engine)}, i == {i:d}")
58+
print(f"engine: {engine!r}, i == {i:d}")
5959
ev_times = bench_with(n, times=1, repeat=1, engine=engine)
6060
ev.loc[i, engine] = np.mean(ev_times)
6161
qu_times = bench_subset(n, times=1, repeat=1, engine=engine)

Diff for: doc/source/getting_started/install.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Instructions for installing :ref:`from source <install.source>`,
2121
Python version support
2222
----------------------
2323

24-
Officially Python 3.9, 3.10 and 3.11.
24+
Officially Python 3.9, 3.10, 3.11 and 3.12.
2525

2626
Installing pandas
2727
-----------------
@@ -203,7 +203,7 @@ pandas requires the following dependencies.
203203
================================================================ ==========================
204204
Package Minimum supported version
205205
================================================================ ==========================
206-
`NumPy <https://numpy.org>`__ 1.22.4
206+
`NumPy <https://numpy.org>`__ 1.23.5
207207
`python-dateutil <https://dateutil.readthedocs.io/en/stable/>`__ 2.8.2
208208
`pytz <https://pypi.org/project/pytz/>`__ 2020.1
209209
`tzdata <https://pypi.org/project/tzdata/>`__ 2022.7

Diff for: doc/source/whatsnew/index.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ This is the list of changes to pandas between each release. For full details,
1010
see the `commit logs <https://github.com/pandas-dev/pandas/commits/>`_. For install and
1111
upgrade instructions, see :ref:`install`.
1212

13-
Version 2.3
13+
Version 3.0
1414
-----------
1515

1616
.. toctree::
1717
:maxdepth: 2
1818

19-
v2.3.0
19+
v3.0.0
2020

2121

2222
Version 2.2
@@ -25,6 +25,7 @@ Version 2.2
2525
.. toctree::
2626
:maxdepth: 2
2727

28+
v2.2.1
2829
v2.2.0
2930

3031
Version 2.1

Diff for: doc/source/whatsnew/v2.1.4.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ Bug fixes
4242
Contributors
4343
~~~~~~~~~~~~
4444

45-
.. contributors:: v2.1.3..v2.1.4|HEAD
45+
.. contributors:: v2.1.3..v2.1.4

Diff for: doc/source/whatsnew/v2.2.0.rst

+10-14
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _whatsnew_220:
22

3-
What's new in 2.2.0 (Month XX, 2024)
4-
------------------------------------
3+
What's new in 2.2.0 (January 19, 2024)
4+
--------------------------------------
55

66
These are the changes in pandas 2.2.0. See :ref:`release` for a full changelog
77
including other versions of pandas.
@@ -436,12 +436,6 @@ index levels when joining on two indexes with different levels (:issue:`34133`).
436436
437437
result
438438
439-
.. ---------------------------------------------------------------------------
440-
.. _whatsnew_220.api_breaking:
441-
442-
Backwards incompatible API changes
443-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
444-
445439
.. _whatsnew_220.api_breaking.deps:
446440

447441
Increased minimum versions for dependencies
@@ -820,7 +814,7 @@ Conversion
820814
- Bug in :meth:`DataFrame.astype` when called with ``str`` on unpickled array - the array might change in-place (:issue:`54654`)
821815
- Bug in :meth:`DataFrame.astype` where ``errors="ignore"`` had no effect for extension types (:issue:`54654`)
822816
- Bug in :meth:`Series.convert_dtypes` not converting all NA column to ``null[pyarrow]`` (:issue:`55346`)
823-
- Bug in ``DataFrame.loc`` was not throwing "incompatible dtype warning" (see `PDEP6 <https://pandas.pydata.org/pdeps/0006-ban-upcasting.html>`_) when assigning a ``Series`` with a different dtype using a full column setter (e.g. ``df.loc[:, 'a'] = incompatible_value``) (:issue:`39584`)
817+
- Bug in :meth:``DataFrame.loc`` was not throwing "incompatible dtype warning" (see `PDEP6 <https://pandas.pydata.org/pdeps/0006-ban-upcasting.html>`_) when assigning a ``Series`` with a different dtype using a full column setter (e.g. ``df.loc[:, 'a'] = incompatible_value``) (:issue:`39584`)
824818

825819
Strings
826820
^^^^^^^
@@ -830,10 +824,10 @@ Strings
830824
- Bug in :meth:`Index.str.cat` always casting result to object dtype (:issue:`56157`)
831825
- Bug in :meth:`Series.__mul__` for :class:`ArrowDtype` with ``pyarrow.string`` dtype and ``string[pyarrow]`` for the pyarrow backend (:issue:`51970`)
832826
- Bug in :meth:`Series.str.find` when ``start < 0`` for :class:`ArrowDtype` with ``pyarrow.string`` (:issue:`56411`)
827+
- Bug in :meth:`Series.str.fullmatch` when ``dtype=pandas.ArrowDtype(pyarrow.string()))`` allows partial matches when regex ends in literal //$ (:issue:`56652`)
833828
- Bug in :meth:`Series.str.replace` when ``n < 0`` for :class:`ArrowDtype` with ``pyarrow.string`` (:issue:`56404`)
834829
- Bug in :meth:`Series.str.startswith` and :meth:`Series.str.endswith` with arguments of type ``tuple[str, ...]`` for :class:`ArrowDtype` with ``pyarrow.string`` dtype (:issue:`56579`)
835830
- Bug in :meth:`Series.str.startswith` and :meth:`Series.str.endswith` with arguments of type ``tuple[str, ...]`` for ``string[pyarrow]`` (:issue:`54942`)
836-
- Bug in :meth:`str.fullmatch` when ``dtype=pandas.ArrowDtype(pyarrow.string()))`` allows partial matches when regex ends in literal //$ (:issue:`56652`)
837831
- Bug in comparison operations for ``dtype="string[pyarrow_numpy]"`` raising if dtypes can't be compared (:issue:`56008`)
838832

839833
Interval
@@ -892,7 +886,6 @@ Plotting
892886

893887
Groupby/resample/rolling
894888
^^^^^^^^^^^^^^^^^^^^^^^^
895-
- Bug in :class:`.Rolling` where duplicate datetimelike indexes are treated as consecutive rather than equal with ``closed='left'`` and ``closed='neither'`` (:issue:`20712`)
896889
- Bug in :meth:`.DataFrameGroupBy.idxmin`, :meth:`.DataFrameGroupBy.idxmax`, :meth:`.SeriesGroupBy.idxmin`, and :meth:`.SeriesGroupBy.idxmax` would not retain :class:`.Categorical` dtype when the index was a :class:`.CategoricalIndex` that contained NA values (:issue:`54234`)
897890
- Bug in :meth:`.DataFrameGroupBy.transform` and :meth:`.SeriesGroupBy.transform` when ``observed=False`` and ``f="idxmin"`` or ``f="idxmax"`` would incorrectly raise on unobserved categories (:issue:`54234`)
898891
- Bug in :meth:`.DataFrameGroupBy.value_counts` and :meth:`.SeriesGroupBy.value_counts` could result in incorrect sorting if the columns of the DataFrame or name of the Series are integers (:issue:`55951`)
@@ -906,6 +899,7 @@ Groupby/resample/rolling
906899
- Bug in :meth:`DataFrame.resample` when resampling on a :class:`ArrowDtype` of ``pyarrow.timestamp`` or ``pyarrow.duration`` type (:issue:`55989`)
907900
- Bug in :meth:`DataFrame.resample` where bin edges were not correct for :class:`~pandas.tseries.offsets.BusinessDay` (:issue:`55281`)
908901
- Bug in :meth:`DataFrame.resample` where bin edges were not correct for :class:`~pandas.tseries.offsets.MonthBegin` (:issue:`55271`)
902+
- Bug in :meth:`DataFrame.rolling` and :meth:`Series.rolling` where duplicate datetimelike indexes are treated as consecutive rather than equal with ``closed='left'`` and ``closed='neither'`` (:issue:`20712`)
909903
- Bug in :meth:`DataFrame.rolling` and :meth:`Series.rolling` where either the ``index`` or ``on`` column was :class:`ArrowDtype` with ``pyarrow.timestamp`` type (:issue:`55849`)
910904

911905
Reshaping
@@ -927,27 +921,29 @@ Reshaping
927921

928922
Sparse
929923
^^^^^^
930-
- Bug in :meth:`SparseArray.take` when using a different fill value than the array's fill value (:issue:`55181`)
924+
- Bug in :meth:`arrays.SparseArray.take` when using a different fill value than the array's fill value (:issue:`55181`)
931925

932926
Other
933927
^^^^^
934928
- :meth:`DataFrame.__dataframe__` did not support pyarrow large strings (:issue:`56702`)
935929
- Bug in :func:`DataFrame.describe` when formatting percentiles in the resulting percentile 99.999% is rounded to 100% (:issue:`55765`)
930+
- Bug in :func:`api.interchange.from_dataframe` where it raised ``NotImplementedError`` when handling empty string columns (:issue:`56703`)
936931
- Bug in :func:`cut` and :func:`qcut` with ``datetime64`` dtype values with non-nanosecond units incorrectly returning nanosecond-unit bins (:issue:`56101`)
937932
- Bug in :func:`cut` incorrectly allowing cutting of timezone-aware datetimes with timezone-naive bins (:issue:`54964`)
938933
- Bug in :func:`infer_freq` and :meth:`DatetimeIndex.inferred_freq` with weekly frequencies and non-nanosecond resolutions (:issue:`55609`)
939-
- Bug in :func:`pd.api.interchange.from_dataframe` where it raised ``NotImplementedError`` when handling empty string columns (:issue:`56703`)
940934
- Bug in :meth:`DataFrame.apply` where passing ``raw=True`` ignored ``args`` passed to the applied function (:issue:`55009`)
941935
- Bug in :meth:`DataFrame.from_dict` which would always sort the rows of the created :class:`DataFrame`. (:issue:`55683`)
942936
- Bug in :meth:`DataFrame.sort_index` when passing ``axis="columns"`` and ``ignore_index=True`` raising a ``ValueError`` (:issue:`56478`)
943937
- Bug in rendering ``inf`` values inside a :class:`DataFrame` with the ``use_inf_as_na`` option enabled (:issue:`55483`)
944938
- Bug in rendering a :class:`Series` with a :class:`MultiIndex` when one of the index level's names is 0 not having that name displayed (:issue:`55415`)
945939
- Bug in the error message when assigning an empty :class:`DataFrame` to a column (:issue:`55956`)
946940
- Bug when time-like strings were being cast to :class:`ArrowDtype` with ``pyarrow.time64`` type (:issue:`56463`)
947-
- Fixed a spurious deprecation warning from ``numba`` >= 0.58.0 when passing a numpy ufunc in :class:`pandas.core.window.Rolling.apply` with ``engine="numba"`` (:issue:`55247`)
941+
- Fixed a spurious deprecation warning from ``numba`` >= 0.58.0 when passing a numpy ufunc in :class:`core.window.Rolling.apply` with ``engine="numba"`` (:issue:`55247`)
948942

949943
.. ---------------------------------------------------------------------------
950944
.. _whatsnew_220.contributors:
951945

952946
Contributors
953947
~~~~~~~~~~~~
948+
949+
.. contributors:: v2.1.4..v2.2.0|HEAD

Diff for: doc/source/whatsnew/v2.2.1.rst

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

0 commit comments

Comments
 (0)