Skip to content

Commit a3704e3

Browse files
Merge remote-tracking branch 'upstream/main' into missing-value-after-comparison
* upstream/main: PERF: use lookup instead of hash_inner_join for merge with unique right keys (pandas-dev#64691) BUG : update `SeriesGroupBy.ohlc()` to honor `as_index=False` (pandas-dev#65141) PERF: Use DataFrame-level reductions in DataFrame.agg with list of funcs (pandas-dev#65031) DOC: document required external libraries in read_* I/O docstrings (pandas-dev#65143) DOC: improve MultiIndex.is_monotonic_increasing/decreasing docstrings (pandas-dev#65154) BUG: Raise ValueError for non-boolean numeric_only in DataFrame/Series reductions (GH#53098) (pandas-dev#65131) BUG: Timedelta.round() raises ZeroDivisionError when internal unit is 's' and target frequency is sub-second (pandas-dev#64836) ENH: Add replace method to Index (closes pandas-dev#19495) (pandas-dev#65099) PERF: improve StringArray.isna (pandas-dev#57733) BUG: read parquet files with older pytz (DEP: keep lower pytz minimum version) (pandas-dev#65133) DEPR: deprecate dates-with-datetime64 in _maybe_downcast_for_indexing (pandas-dev#64871) DOC: note that DataFrame.values is not writeable (pandas-dev#65142) CLN: Update groupby observed defaults (pandas-dev#65148) PERF: avoid materializing values[indexer] in Block.setitem (pandas-dev#64251) DOC: update GroupBy.sum/min/max See Also sections (pandas-dev#65144)
2 parents 184979a + 48295cd commit a3704e3

Some content is hidden

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

42 files changed

+485
-71
lines changed

ci/deps/actions-311-minimum_versions.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ dependencies:
5050
- pyreadstat=1.2.8
5151
- pytables=3.10.1
5252
- python-calamine=0.3.0
53-
- pytz=2024.2
53+
- pytz=2020.1
5454
- pyxlsb=1.0.10
5555
- s3fs=2024.10.0
5656
- scipy=1.14.1

ci/deps/actions-311.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ dependencies:
4949
- pyreadstat>=1.2.8
5050
- pytables>=3.10.1
5151
- python-calamine>=0.3.0
52-
- pytz>=2024.2
52+
- pytz>=2020.1
5353
- pyxlsb>=1.0.10
5454
- s3fs>=2024.10.0
5555
- scipy>=1.14.1

ci/deps/actions-312.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ dependencies:
4949
- pyreadstat>=1.2.8
5050
- pytables>=3.10.1
5151
- python-calamine>=0.3.0
52-
- pytz>=2024.2
52+
- pytz>=2020.1
5353
- pyxlsb>=1.0.10
5454
- s3fs>=2024.10.0
5555
- scipy>=1.14.1

ci/deps/actions-313-downstream_compat.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ dependencies:
4848
- pyreadstat>=1.2.8
4949
- pytables>=3.10.1
5050
- python-calamine>=0.3.0
51-
- pytz>=2024.2
51+
- pytz>=2020.1
5252
- pyxlsb>=1.0.10
5353
- s3fs>=2024.10.0
5454
- scipy>=1.14.1

ci/deps/actions-313.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ dependencies:
5050
- pyreadstat>=1.2.8
5151
- pytables>=3.10.1
5252
- python-calamine>=0.3.0
53-
- pytz>=2024.2
53+
- pytz>=2020.1
5454
- pyxlsb>=1.0.10
5555
- s3fs>=2024.10.0
5656
- scipy>=1.14.1

ci/deps/actions-314.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ dependencies:
4848
- pyreadstat>=1.2.8
4949
- pytables>=3.10.1
5050
- python-calamine>=0.3.0
51-
- pytz>=2024.2
51+
- pytz>=2020.1
5252
- pyxlsb>=1.0.10
5353
- s3fs>=2024.10.0
5454
- scipy>=1.14.1

doc/source/getting_started/install.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,5 +379,5 @@ Installable with ``pip install "pandas[timezone]"``
379379
========================================== ================== =================== ==============================================
380380
Dependency Minimum Version pip extra Notes
381381
========================================== ================== =================== ==============================================
382-
`pytz <https://github.com/stub42/pytz>`__ 2024.2 timezone Alternative timezone library to ``zoneinfo``.
382+
`pytz <https://github.com/stub42/pytz>`__ 2020.1 timezone Alternative timezone library to ``zoneinfo``.
383383
========================================== ================== =================== ==============================================

doc/source/whatsnew/v3.0.3.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ including other versions of pandas.
1414
Fixed regressions
1515
~~~~~~~~~~~~~~~~~
1616

17+
- Fixed reading of Parquet files with timezone-aware timestamps or localizing of a timeseries with a ``pytz`` timezone when an older version of ``pytz`` was installed (:issue:`64978`)
18+
1719
.. ---------------------------------------------------------------------------
1820
.. _whatsnew_303.bug_fixes:
1921

doc/source/whatsnew/v3.1.0.rst

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Other enhancements
3131
- :class:`Period` now supports f-string formatting via ``__format__``, e.g. ``f"{period:%Y-%m}"`` (:issue:`48536`)
3232
- :meth:`.DataFrameGroupBy.agg` now allows for the provided ``func`` to return a NumPy array (:issue:`63957`)
3333
- Added :meth:`ExtensionArray.count` (:issue:`64450`)
34+
- Added :meth:`Index.replace` method to support value replacement functionality similar to :meth:`Series.replace` (:issue:`19495`)
3435
- Display formatting for float sequences in DataFrame cells now respects the ``display.precision`` option (:issue:`60503`).
3536
- Improved the precision of float parsing in :func:`read_csv` (:issue:`64395`)
3637
- Improved the string ``repr`` of :class:`pd.core.arrays.SparseArray` (:issue:`64547`)
@@ -103,6 +104,7 @@ Deprecations
103104
- Deprecated arithmetic operations between pandas objects (:class:`DataFrame`, :class:`Series`, :class:`Index`, and pandas-implemented :class:`ExtensionArray` subclasses) and list-likes other than ``list``, ``np.ndarray``, :class:`ExtensionArray`, :class:`Index`, :class:`Series`, :class:`DataFrame`. For e.g. ``tuple`` or ``range``, explicitly cast these to a supported object instead. In a future version, these will be treated as scalar-like for pointwise operation (:issue:`62423`)
104105
- Deprecated automatic dtype promotion when reindexing with a ``fill_value`` that cannot be held by the original dtype. Explicitly cast to a common dtype instead (:issue:`53910`)
105106
- Deprecated grouping by an index level name when the name matches multiple levels of a :class:`MultiIndex`. Use the level number instead (:issue:`49434`)
107+
- Deprecated implicit conversion of ``datetime.date`` objects to :class:`Timestamp` when indexing or joining a :class:`DatetimeIndex`. Use :func:`to_datetime` to explicitly convert to :class:`DatetimeIndex` instead (:issue:`62158`)
106108
- Deprecated passing a ``dict`` to :meth:`DataFrame.from_records`, use the :class:`DataFrame` constructor or :meth:`DataFrame.from_dict` instead (:issue:`22025`)
107109
- Deprecated passing a non-dict (e.g. a list of dicts) to :meth:`DataFrame.from_dict`. Use the :class:`DataFrame` constructor instead (:issue:`58862`)
108110
- Deprecated passing unnecessary ``*args`` and ``**kwargs`` to :meth:`.GroupBy.cumsum`, :meth:`.GroupBy.cumprod`, :meth:`.GroupBy.cummin`, :meth:`.GroupBy.cummax`, :meth:`.SeriesGroupBy.skew`, :meth:`.DataFrameGroupBy.skew`, :meth:`.SeriesGroupBy.take`, and :meth:`.DataFrameGroupBy.take`. The ``skipna`` parameter for the cum* methods is now an explicit keyword argument (:issue:`50407`)
@@ -114,6 +116,12 @@ Deprecations
114116
- Deprecated the ``xlrd`` and ``pyxlsb`` engines in :func:`read_excel`. Use ``engine="calamine"`` instead (:issue:`56542`)
115117
- Deprecated the default value of ``exact`` in :func:`assert_index_equal`; in a future version this will default to ``True`` instead of "equiv" (:issue:`57436`)
116118
- Deprecated the default value of ``track_times`` in :meth:`HDFStore.put`. In a future version, the default will change from ``True`` to ``False`` so that HDF5 files are deterministic by default (:issue:`51456`)
119+
- Deprecated passing a non-boolean value for ``numeric_only`` to :meth:`DataFrame.mean`,
120+
:meth:`DataFrame.min`, :meth:`DataFrame.max`, :meth:`DataFrame.median`,
121+
:meth:`DataFrame.skew`, :meth:`DataFrame.kurt`, :meth:`DataFrame.std`,
122+
:meth:`DataFrame.var`, :meth:`DataFrame.sem`, :meth:`DataFrame.sum`,
123+
:meth:`DataFrame.prod` (and their :class:`Series` equivalents); this will raise in
124+
a future version of pandas (:issue:`53098`)
117125
- Deprecated the inference of ``datetime64`` dtype from data containing ``datetime.date`` objects when used in comparisons or :meth:`Index.equals` with :class:`DatetimeIndex`. Use :func:`pandas.to_datetime` to explicitly convert to ``datetime64`` instead (:issue:`65056`)
118126
-
119127

@@ -131,6 +139,7 @@ Performance improvements
131139
- Performance improvement in :func:`bdate_range` and :func:`date_range` with ``freq="B"`` or ``freq="C"`` (business day frequencies) (:issue:`16463`)
132140
- Performance improvement in :func:`infer_freq` (:issue:`64463`)
133141
- Performance improvement in :func:`merge` and :meth:`DataFrame.join` for many-to-many joins with ``sort=False`` (:issue:`56564`)
142+
- Performance improvement in :func:`merge` for many-to-one joins with unique right keys (:issue:`38418`)
134143
- Performance improvement in :func:`merge` with ``how="cross"`` (:issue:`38082`)
135144
- Performance improvement in :func:`merge` with ``how="left"`` (:issue:`64370`)
136145
- Performance improvement in :func:`merge` with ``sort=False`` for single-key ``how="left"``/``how="right"`` joins when the opposite join key is sorted, unique, and range-like (:issue:`64146`)
@@ -171,6 +180,9 @@ Performance improvements
171180
- Performance improvement in :meth:`DataFrame.loc` and :meth:`DataFrame.iloc`
172181
setitem with a 2D list-of-lists value by avoiding a wasteful round-trip
173182
through an intermediate object array (:issue:`64229`).
183+
- Performance improvement in :meth:`Series.iloc` and :meth:`DataFrame.iloc`
184+
when setting datetimelike values into object-dtype data with list-like
185+
indexers (:issue:`64250`).
174186

175187
.. ---------------------------------------------------------------------------
176188
.. _whatsnew_310.bug_fixes:
@@ -208,7 +220,7 @@ Timedelta
208220
^^^^^^^^^
209221
- Bug in :class:`DateOffset` where ``DateOffset(1)`` and ``DateOffset(days=1)`` returned different results near daylight saving time transitions (:issue:`61862`)
210222
- Bug in :func:`to_timedelta` where passing ``np.str_`` objects would fail in Cython string parsing (:issue:`48974`)
211-
-
223+
- Fixed regression in :meth:`Timedelta.round`, :meth:`Timedelta.floor`, and :meth:`Timedelta.ceil` raising ``ZeroDivisionError`` for sub-second ``freq`` (:issue:`64828`)
212224

213225
Timezones
214226
^^^^^^^^^
@@ -295,6 +307,7 @@ Groupby/resample/rolling
295307
- Bug in :meth:`.GroupBy.any` and :meth:`.GroupBy.all` returning ``NaN`` with ``float64`` dtype for unobserved categorical groups on NumPy ``bool`` data instead of the boolean identity value with ``bool`` dtype (:issue:`65100`)
296308
- Bug in :meth:`.Rolling.skew` and :meth:`.Rolling.kurt` (and their :class:`GroupBy` counterparts) returning ``0.0`` and ``-3.0`` respectively for degenerate windows or groups; these now return ``NaN`` (:issue:`62864`)
297309
- Bug in :meth:`.Rolling.skew` and :meth:`.Rolling.kurt` returning ``NaN`` for low-variance windows (:issue:`62946`)
310+
- Bug in :meth:`.SeriesGroupBy.ohlc` ignoring ``as_index=False`` (:issue:`65140`)
298311
- Bug in :meth:`DataFrame.groupby` with a :class:`Grouper` with ``freq`` raising ``AttributeError`` when all grouping keys are ``NaT`` (:issue:`43486`)
299312
- Bug in :meth:`Series.resample` and :meth:`DataFrame.resample` where same-frequency resampling with monthly, quarterly, or annual frequencies bypassed aggregation, returning the original values instead of the aggregation result (:issue:`18553`)
300313

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ dependencies:
4949
- pyreadstat>=1.2.8
5050
- pytables>=3.10.1
5151
- python-calamine>=0.3.0
52-
- pytz>=2024.2
52+
- pytz>=2020.1
5353
- pyxlsb>=1.0.10
5454
- s3fs>=2024.10.0
5555
- scipy>=1.14.1

0 commit comments

Comments
 (0)