Warning
Starting with the 0.25.x series of releases, pandas only supports Python 3.5.3 and higher. See Dropping Python 2.7 for more details.
Warning
The minimum supported Python version will be bumped to 3.6 in a future release.
{{ header }}
These are the changes in pandas 1.0.0. See :ref:`release` for a full changelog including other versions of pandas.
- :meth:`DataFrame.to_latex` now accepts
caption
andlabel
arguments (:issue:`25436`) - :meth:`DataFrame.to_string` added the
max_colwidth
parameter to control when wide columns are truncated (:issue:`9784`)
- :class:`pandas.core.groupby.GroupBy.transform` now raises on invalid operation names (:issue:`27489`).
- :meth:`pandas.api.types.infer_dtype` will now return "integer-na" for integer and
np.nan
mix (:issue:`27283`)
- Removed the previously deprecated :meth:`Series.get_value`, :meth:`Series.set_value`, :meth:`DataFrame.get_value`, :meth:`DataFrame.set_value` (:issue:`17739`)
- Changed the the default value of inplace in :meth:`DataFrame.set_index` and :meth:`Series.set_axis`. It now defaults to False (:issue:`27600`)
- :meth:`pandas.Series.str.cat` now defaults to aligning
others
, usingjoin='left'
(:issue:`27611`) - :meth:`pandas.Series.str.cat` does not accept list-likes within list-likes anymore (:issue:`27611`)
- Removed the previously deprecated :meth:`ExtensionArray._formatting_values`. Use :attr:`ExtensionArray._formatter` instead. (:issue:`23601`)
- Removed the previously deprecated
IntervalIndex.from_intervals
in favor of the :class:`IntervalIndex` constructor (:issue:`19263`)
- Performance improvement in indexing with a non-unique :class:`IntervalIndex` (:issue:`27489`)
- Performance improvement in MultiIndex.is_monotonic (:issue:`27495`)
- Performance improvement in :func:`cut` when
bins
is an :class:`IntervalIndex` (:issue:`27668`) - Performance improvement in :meth:`DataFrame.replace` when provided a list of values to replace (:issue:`28099`)
- Added test to assert the :func:`fillna` raises the correct ValueError message when the value isn't a value from categories (:issue:`13628`)
- Bug in :meth:`Series.__setitem__` incorrectly casting
np.timedelta64("NaT")
tonp.datetime64("NaT")
when inserting into a :class:`Series` with datetime64 dtype (:issue:`27311`) - Bug in :meth:`Series.dt` property lookups when the underlying data is read-only (:issue:`27529`)
- Bug in
HDFStore.__getitem__
incorrectly reading tz attribute created in Python 2 (:issue:`26443`)
- Bug in :meth:`DataFrame.quantile` with zero-column :class:`DataFrame` incorrectly raising (:issue:`23925`)
- Bug in assignment using a reverse slicer (:issue:`26939`)
- :meth:`read_csv` now accepts binary mode file buffers when using the Python csv engine (:issue:`23779`)
- Bug in :meth:`DataFrame.to_json` where using a Tuple as a column or index value and using
orient="columns"
ororient="index"
would produce invalid JSON (:issue:`20500`) - Improve infinity parsing. :meth:`read_csv` now interprets
Infinity
,+Infinity
,-Infinity
as floating point values (:issue:`10065`) - Bug in :func:`DataFrame.to_string` where values were truncated using display options instead of outputting the full content (:issue:`9784`)
- Bug in :meth:`Series.plot` not able to plot boolean values (:issue:`23719`)
- Bug in :meth:`DataFrame.plot` producing incorrect legend markers when plotting multiple series on the same axis (:issue:`18222`)
- Bug in :meth:`DataFrame.plot` when
kind='box'
and data contains datetime or timedelta data. These types are now automatically dropped (:issue:`22799`) - Bug in :meth:`DataFrame.plot.line` and :meth:`DataFrame.plot.area` produce wrong xlim in x-axis (:issue:`27686`, :issue:`25160`, :issue:`24784`)
- :func:`set_option` now validates that the plot backend provided to
'plotting.backend'
implements the backend when the option is set, rather than when a plot is created (:issue:`28163`)
- Bug in :meth:`DataFrame.rolling` not allowing for rolling over datetimes when
axis=1
(:issue: 28192) - Bug in :meth:`DataFrame.groupby` not offering selection by column name when
axis=1
(:issue:`27614`) - Bug in :meth:`DataFrameGroupby.agg` not able to use lambda function with named aggregation (:issue:`27519`)
- Bug in :class:`SparseDataFrame` arithmetic operations incorrectly casting inputs to float (:issue:`28107`)
- Fixed pyqt development dependency issue because of different pyqt package name in conda and PyPI (:issue:`26838`)
- Trying to set the
display.precision
,display.max_rows
ordisplay.max_columns
using :meth:`set_option` to anything but aNone
or a positive int will raise aValueError
(:issue:`23348`) - Using :meth:`DataFrame.replace` with overlapping keys in a nested dictionary will no longer raise, now matching the behavior of a flat dictionary (:issue:`27660`)
- :meth:`DataFrame.to_csv` and :meth:`Series.to_csv` now support dicts as
compression
argument with key'method'
being the compression method and others as additional compression options when the compression method is'zip'
. (:issue:`26023`)