These are the changes in pandas 1.2.0. See :ref:`release` for a full changelog including other versions of pandas.
{{ header }}
:meth:`to_csv` supports file handles in binary mode (:issue:`19827` and :issue:`35058`)
with encoding
(:issue:`13068` and :issue:`23854`) and compression
(:issue:`22555`).
mode
has to contain a b
for binary handles to be supported.
For example:
.. ipython:: python import io data = pd.DataFrame([0, 1, 2]) buffer = io.BytesIO() data.to_csv(buffer, mode="w+b", encoding="utf-8", compression="gzip")
- :class:`Index` with object dtype supports division and multiplication (:issue:`34160`)
- Bug in :attr:`DatetimeArray.date` where a
ValueError
would be raised with a read-only backing array (:issue:`33530`) - Bug in
NaT
comparisons failing to raiseTypeError
on invalid inequality comparisons (:issue:`35046`)
- Bug in :class:`TimedeltaIndex`, :class:`Series`, and :class:`DataFrame` floor-division with
timedelta64
dtypes andNaT
in the denominator (:issue:`35529`)
- Bug in :func:`date_range` was raising AmbiguousTimeError for valid input with ambiguous=False (:issue:`35297`)
- Bug in :meth:`to_csv` caused a
ValueError
when it was called with a filename in combination withmode
containing ab
(:issue:`35058`)
- Bug in :meth:`DataFrameGroupBy.apply` that would some times throw an erroneous
ValueError
if the grouping axis had duplicate entries (:issue:`16646`) - Bug in :meth:`DataFrameGroupBy.apply` where a non-nuisance grouping column would be dropped from the output columns if another groupby method was called before
.apply()
(:issue:`34656`)