These are the changes in pandas 3.0.0. See :ref:`release` for a full changelog including other versions of pandas.
{{ header }}
- :func:`DataFrame.to_excel` now raises an
UserWarning
when the character count in a cell exceeds Excel's limitation of 32767 characters (:issue:`56954`) - :func:`read_stata` now returns
datetime64
resolutions better matching those natively stored in the stata format (:issue:`55642`)
These are bug fixes that might have notable behavior changes.
Some minimum supported versions of dependencies were updated. If installed, we now require:
Package | Minimum Version | Required | Changed |
---|---|---|---|
numpy | 1.23.5 | X | X |
For optional libraries the general recommendation is to use the latest version. The following table lists the lowest version per library that is currently being tested throughout the development of pandas. Optional libraries below the lowest tested version may still work, but are not considered supported.
Package | New Minimum Version |
---|---|
See :ref:`install.dependencies` and :ref:`install.optional_dependencies` for more.
- 3rd party
py.path
objects are no longer explicitly supported in IO methods. Use :py:class:`pathlib.Path` objects instead (:issue:`57091`)
- Deprecated :meth:`Timestamp.utcfromtimestamp`, use
Timestamp.fromtimestamp(ts, "UTC")
instead (:issue:`56680`) - Deprecated :meth:`Timestamp.utcnow`, use
Timestamp.now("UTC")
instead (:issue:`56680`)
- Removed :meth:`DataFrame.first` and :meth:`DataFrame.last` (:issue:`53710`)
- Removed :meth:`DataFrameGroupby.fillna` and :meth:`SeriesGroupBy.fillna` (:issue:`55719`)
- Removed
DataFrameGroupBy.grouper
andSeriesGroupBy.grouper
(:issue:`56521`) - Removed
axis
argument from :meth:`DataFrame.groupby`, :meth:`Series.groupby`, :meth:`DataFrame.rolling`, :meth:`Series.rolling`, :meth:`DataFrame.resample`, and :meth:`Series.resample` (:issue:`51203`) - Removed
axis
argument from all groupby operations (:issue:`50405`) - Removed deprecated argument
obj
in :meth:`.DataFrameGroupBy.get_group` and :meth:`.SeriesGroupBy.get_group` (:issue:`53545`) - Removed the
ArrayManager
(:issue:`55043`)
- Performance improvement in :meth:`DataFrame.join` for sorted but non-unique indexes (:issue:`56941`)
- Performance improvement in :meth:`DataFrame.join` when left and/or right are non-unique and
how
is"left"
,"right"
, or"inner"
(:issue:`56817`) - Performance improvement in :meth:`DataFrame.join` with
how="left"
orhow="right"
andsort=True
(:issue:`56919`) - Performance improvement in :meth:`DataFrameGroupBy.ffill`, :meth:`DataFrameGroupBy.bfill`, :meth:`SeriesGroupBy.ffill`, and :meth:`SeriesGroupBy.bfill` (:issue:`56902`)
- Performance improvement in :meth:`Index.join` by propagating cached attributes in cases where the result matches one of the inputs (:issue:`57023`)
- Performance improvement in :meth:`Index.take` when
indices
is a full range indexer from zero to length of index (:issue:`56806`) - Performance improvement in :meth:`MultiIndex.equals` for equal length indexes (:issue:`56990`)
- Performance improvement in indexing operations for string dtypes (:issue:`56997`)
- Fixed bug in :meth:`DataFrame.join` inconsistently setting result index name (:issue:`55815`)
- Fixed bug in :meth:`Series.diff` allowing non-integer values for the
periods
argument. (:issue:`56607`)
- Bug in :func:`date_range` where the last valid timestamp would sometimes not be produced (:issue:`56134`)
- Bug in
np.matmul
with :class:`Index` inputs raising aTypeError
(:issue:`57079`)
- Bug in :meth:`Series.value_counts` would not respect
sort=False
for series havingstring
dtype (:issue:`55224`)
- Bug in :meth:`.DataFrameGroupBy.quantile` when
interpolation="nearest"
is inconsistent with :meth:`DataFrame.quantile` (:issue:`47942`) - Bug in :meth:`DataFrame.ewm` and :meth:`Series.ewm` when passed
times
and aggregation functions other than mean (:issue:`51695`)
- Fixed bug in :meth:`api.types.is_datetime64_any_dtype` where a custom :class:`ExtensionDtype` would return
False
for array-likes (:issue:`57055`)
- Bug in :meth:`DataFrame.where` where using a non-bool type array in the function would return a
ValueError
instead of aTypeError
(:issue:`56330`)