These are the changes in pandas 1.5.0. See :ref:`release` for a full changelog including other versions of pandas.
{{ header }}
- New method :meth:`.Styler.to_string` for alternative customisable output methods (:issue:`44502`)
- Improved the rendering of
categories
in :class:`CategoricalIndex` (:issue:`45218`)
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 the keyword
line_terminator
in :meth:`DataFrame.to_csv` and :meth:`Series.to_csv`, uselineterminator
instead; this is for consistency with :func:`read_csv` and the standard library 'csv' module (:issue:`9568`)
- Bug in :meth:`CategoricalIndex.union` when the index's categories are integer-dtype and the index contains
NaN
values incorrectly raising instead of casting tofloat64
(:issue:`45362`)
- Bug in :meth:`DataFrame.quantile` with datetime-like dtypes and no rows incorrectly returning
float64
dtype instead of retaining datetime-like dtype (:issue:`41544`) - Bug in :func:`to_datetime` with sequences of
np.str_
objects incorrectly raising (:issue:`32264`) - Bug in :class:`Timestamp` construction when passing datetime components as positional arguments and
tzinfo
as a keyword argument incorrectly raising (:issue:`31929`)
- Bug in constructing a :class:`Series` from a float-containing list or a floating-dtype ndarray-like (e.g.
dask.Array
) and an integer dtype raising instead of casting like we would with annp.ndarray
(:issue:`40110`)
- Bug in :meth:`DataFrame.iloc` where indexing a single row on a :class:`DataFrame` with a single ExtensionDtype column gave a copy instead of a view on the underlying data (:issue:`45241`)
- Bug in :meth:`Series.__setitem__` with a non-integer :class:`Index` when using an integer key to set a value that cannot be set inplace where a
ValueError
was raised insead of casting to a common dtype (:issue:`45070`) - Bug when setting an integer too large for a :class:`Series` dtype failing to coerce to a common type (:issue:`26049`)
- Bug in :meth:`IntegerArray.searchsorted` and :meth:`FloatingArray.searchsorted` returning inconsistent results when acting on
np.nan
(:issue:`45255`)