These are the changes in pandas 2.1.0. See :ref:`release` for a full changelog including other versions of pandas.
{{ header }}
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 |
---|---|---|---|
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 | Minimum Version | Changed |
---|---|---|
X |
See :ref:`install.dependencies` and :ref:`install.optional_dependencies` for more.
- Deprecated accepting slices in :meth:`DataFrame.take`, call
obj[slicer]
or pass a sequence of integers instead (:issue:`51539`) - Deprecated passing a :class:`DataFrame` to :meth:`DataFrame.from_records`, use :meth:`DataFrame.set_index` or :meth:`DataFrame.drop` instead (:issue:`51353`)
- Performance improvement in :meth:`DataFrame.where` when
cond
is backed by an extension dtype (:issue:`51574`) - Performance improvement in :meth:`~arrays.ArrowExtensionArray.isna` when array has zero nulls or is all nulls (:issue:`51630`)
- Performance improvement in :meth:`DataFrame.first_valid_index` and :meth:`DataFrame.last_valid_index` for extension array dtypes (:issue:`51549`)
- Performance improvement in :meth:`DataFrame.clip` and :meth:`Series.clip` (:issue:`51472`)
- Performance improvement in :func:`read_parquet` on string columns when using
use_nullable_dtypes=True
(:issue:`47345`) - Performance improvement in :meth:`read_orc` when reading a remote URI file path. (:issue:`51609`)
- Bug in :meth:`Timestamp.round` with values close to the implementation bounds returning incorrect results instead of raising
OutOfBoundsDatetime
(:issue:`51494`)
- Bug in :meth:`Timedelta.round` with values close to the implementation bounds returning incorrect results instead of raising
OutOfBoundsTimedelta
(:issue:`51494`) - Bug in :class:`TimedeltaIndex` division or multiplication leading to
.freq
of "0 Days" instead ofNone
(:issue:`51575`)
- Bug in :meth:`Series.corr` and :meth:`Series.cov` raising
AttributeError
for masked dtypes (:issue:`51422`)
- Bug in :meth:`DataFrameGroupBy.idxmin`, :meth:`SeriesGroupBy.idxmin`, :meth:`DataFrameGroupBy.idxmax`, :meth:`SeriesGroupBy.idxmax` return wrong dtype when used on empty DataFrameGroupBy or SeriesGroupBy (:issue:`51423`)
- Bug in :meth:`Series.any` and :meth:`Series.all` returning
NA
for empty or all null pyarrow-backed data whenskipna=True
(:issue:`51624`)