SparseSeries
, SparseDataFrame
and the DataFrame.to_sparse
method have been removed ( GH ). We recommend using a Series
or DataFrame
with sparse values instead. See Migrating for help with migrating existing code.
Previously, pandas would register converters with matplotlib as a side effect of importing pandas ( GH )). This changed the output of plots made via matplotlib plots after pandas was imported, even if you were using matplotlib directly rather than plot ()
.
Note that plots created by DataFrame.plot ()
and Series.plot ()
do register the converters automatically. The only behavior change is when plotting a date-like object via matplotlib.pyplot.plot or
matplotlib.Axes.plot
. See Custom formatters for timeseries plots for more.
(
Removed the previously deprecated keyword “index” from
read_stata ()
, StataReader
, and StataReader.read ()
, use “index_col” instead ( (GH) ) Removed StataReader.data
method, use StataReader.read () (instead) (GH)
Removed pandas.plotting._matplotlib. tsplot
, use
Series.plot () instead ( (GH) )
pandas.tseries.converter.register
has been moved to pandas.plotting.register_matplotlib_converters ()
( GH
Series.plot () no longer accepts positional arguments, pass keyword arguments instead ( GH )
DataFrame.hist ()
and Series.hist () no longer allows figsize="default"
, specify figure size by passinig a tuple instead ( (GH)
Floordiv of integer-dtyped array by Timedelta
now raises TypeError
( GH
TimedeltaIndex
and DatetimeIndex
no longer accept non-nanosecond dtype strings like “timedelta 17739 ”or” datetime 18217 ”, use“ timedelta [ns] “and” datetime 17739 [ns] ”instead ( GH
Changed the default “skipna” argument in pandas.api.types.infer_dtype ()
False to True (( GH
Removed Series.ix
and DataFrame.ix ( GH)
Removed Index.summary
( (GH)
Removed the previously deprecated keyword “fastpath” from the Index
constructor ( (GH)
Removed Series.get_value
, Series.set_value ,
( (GH) DataFrame.get_value
, DataFrame.set_value
Removed Series.compound
and DataFrame.compound ( GH
Changed the default “inplace” argument in DataFrame.set_index ()
and Series.set_axis ()
(None)
to False
( GH
Removed Series.cat.categorical
, Series.cat.index , Series.cat.name
( (GH)
Removed the previously deprecated keyword “box” from
to_datetime ()
and
to_timedelta ()
; in addition these now always returns DatetimeIndex
TimedeltaIndex
, Index
, Series
, or DataFrame ( (GH) )
to_timedelta ()
,
Timedelta
, and TimedeltaIndex no longer allow “M”, “Y”, or “Y” for the “unit” argument ( (GH)
Removed the previously deprecated keyword “time_rule” from (non-public) offsets.generate_range
, which has been moved to core.arrays._ranges.generate_range ()
( (GH)
DataFrame.loc ()
or
Series.loc () with listlike indexers and missing labels will no longer reindex ( (GH)
DataFrame.to_excel ()
and Series.to_excel ()
with non-existent columns will no longer reindex ( (GH)
Removed the previously deprecated keyword “join_axes” from () concat () ; use reindex_like
on the result instead ( GH
Removed the previously deprecated keyword “by” from DataFrame.sort_index ()
, use DataFrame.sort_values ()
instead ( (GH) )
Removed support for nested renaming in DataFrame.aggregate ()
, Series.aggregate ()
, core.groupby.DataFrameGroupBy.aggregate () , core.groupby.SeriesGroupBy.aggregate () , core.window.rolling .Rolling.aggregate () ( (GH)
Passing datetime
data to TimedeltaIndex
or timedelta
data to DatetimeIndex
now raises TypeError
( (GH) (GH) )
Passing int
.
A tuple passed to DataFrame.groupby ()
is now exclusively treated as a single key ( (GH)
Removed Index.contains
, use key (in index
instead ( (GH)
Addition and subtraction of int
or integer-arrays is no longer allowed in Timestamp
, , DatetimeIndex
,
TimedeltaIndex
, use obj n obj.freq
instead of obj n (( (GH)
Removed Series.ptp
( (GH) )
Removed Series.from_array
( (GH) )
Removed DataFrame.from_items
( (GH) )
Removed Series.asobject
( GH
)
Removed DataFrame.as_blocks
, Series.as_blocks ,
( (GH) ) DataFrame.blocks
, Series.blocks
pandas.Series.str.cat ()
now defaults to aligning others , using
join='left'
( (GH) )
pandas.Series.str.cat ()
does not accept list-likes within (list-likes anymore) (GH)
Series.where () with
Categorical (dtype) or
DataFrame.where ()
with Categorical
column) no longer allows setting new categories ( (GH)
Removed the previously deprecated keywords “start”, “end”, and “periods” from the DatetimeIndex
, TimedeltaIndex
) , and PeriodIndex
constructors; use date_range ()
, timedelta_range ()
, and
(period_range ()
instead ( (GH)
Removed the previously deprecated keyword “verify_integrity” from the DatetimeIndex
and TimedeltaIndex
constructors ( GH )
Removed the previously deprecated keyword “fastpath” from
pandas.core.internals.blocks.make_block
( (GH) )
Removed the previously deprecated keyword “dtype” from
Block.make_block_same_class ()
(
Removed ExtensionArray._formatting_values
. Use ExtensionArray._formatter
instead. ( (GH) )
Removed MultiIndex.labels
, use MultiIndex.codes
instead ( (GH)
Removed the previously deprecated keyword “labels” from the
MultiIndex
constructor, use “codes” instead ( (GH)
Removed MultiIndex.set_labels
, use MultiIndex.set_codes ()
instead ( (GH)
Removed the previously deprecated keyword “labels” from
MultiIndex.set_codes ()
, MultiIndex.copy ()
, MultiIndex.drop ()
, use “codes” instead ( (GH)
Removed support for legacy HDF5 formats ( (GH) )
Passing a dtype alias (eg 'datetime [ns, UTC] ') to DatetimeTZDtype
is no longer allowed, use DatetimeTZDtype.construct_from_string ()
instead ( GH 24751 )
Removed the previously deprecated keyword “skip_footer” from read_excel ()
; use “skipfooter” instead ( (GH) )
read_excel ()
no longer allows an integer value for the parameter usecols
, instead pass a list of integers from 0 to (usecols
inclusive (GH)
Removed the previously deprecated keyword “convert_datetime 17739 ”from DataFrame.to_records ()
( (GH) )
Removed IntervalIndex.from_intervals
in favor of the IntervalIndex
constructor ( (GH)
Changed the default “keep_tz” argument in DatetimeIndex.to_series ()
from None
(True) ( (GH)
Removed api.types.is_period
and api.types.is_datetimetz
( (GH)
Ability to read pickles containing Categorical
instances created with pre- 0. 17328 version of pandas has been removed ( (GH) () )
Removed pandas.tseries.plotting. tsplot
( (GH)
Removed the previously deprecated keywords “reduce” and “broadcast” from DataFrame.apply ()
( (GH)
Removed the previously deprecated assert_raises_regex
function in pandas._testing
( (GH) )
Removed the previously deprecated FrozenNDArray
class in pandas.core.indexes.frozen
( (GH)
)
Removed the previously deprecated keyword “nthreads” from read_feather ()
, use “use_threads” instead ( (GH) )
Removed Index.is_lexsorted_for_tuple
( (GH)
)
Removed support for nested renaming in DataFrame.aggregate ()
, Series.aggregate ()
, core.groupby.DataFrameGroupBy.aggregate () , core.groupby.SeriesGroupBy.aggregate () , core.window.rolling .Rolling.aggregate () ( (GH)
Removed Series.valid
; use Series.dropna ()
instead ( (GH) ))
Removed DataFrame.is_copy
, Series.is_copy ( (GH)
Removed DataFrame.get_ftype_counts
, Series.get_ftype_counts ( (GH)
Removed DataFrame.ftypes
, Series.ftypes
, Series.ftype
( (GH)
)
Removed Index.get_duplicates
, use idx [idx.duplicated()]. unique ()
instead ( (GH)
Removed Series.clip_upper
, Series.clip_lower , DataFrame.clip_upper
,
DataFrame.clip_lower ( (GH) )
Removed the ability to alter DatetimeIndex.freq ,
( (GH) ) TimedeltaIndex.freq
, or
PeriodIndex.freq
Removed DatetimeIndex.offset
( GH
Removed DatetimeIndex.asobject
, TimedeltaIndex.asobject , PeriodIndex.asobject
, use astype (object)
instead ( (GH)
Removed the previously deprecated keyword “order” from factorize ()
(GH) )
Removed the previously deprecated keyword “encoding” from read_stata ()
and DataFrame.to_stata ()
(( (GH) )
Changed the default “sort” argument in concat ()
( None
False ( (GH) )
Removed the previously deprecated keyword “raise_conflict” from DataFrame.update ()
, use “errors” instead (
Removed the previously deprecated keyword “n” from
DatetimeIndex.shift ()
, TimedeltaIndex.shift ()
, PeriodIndex.shift () , use “periods” instead ( (GH)
Removed the previously deprecated keywords “how”, “fill_method”, and “limit” from DataFrame.resample ()
(
(GH)
)
Passing an integer to Series.fillna () or DataFrame.fillna ()
with timedelta 17739 [ns] dtype now raises TypeError
( (GH)
Passing multiple axes to DataFrame.dropna ()
(is no longer supported) (GH)
Removed Series.nonzero
, use to_numpy (). nonzero () (instead) (GH)
)
Passing floating dtype codes
to Categorical.from_codes ()
is no longer supported, pass codes.astype (np.int 17656)
instead ( (GH) )
Removed the previously deprecated keyword “pat” from Series.str.partition ()
and Series.str.rpartition ()
, use “sep” instead ( (GH)
Removed Series.put
( (GH) )
Removed Series.real
, Series.imag ( (GH) )
Removed Series.to_dense
, DataFrame.to_dense ( (GH) )
Removed Index.dtype_str
, use str (index.dtype) (instead) (GH) )
Categorical.ravel ()
returns a Categorical
instead of a ndarray ( (GH) () )
The ‘outer’ method on Numpy ufuncs, e.g. np.subtract.outer
operating on Series
objects is no longer supported, and will raise NotImplementedError
( (GH)
Removed Series.get_dtype_counts
and DataFrame.get_dtype_counts ( (GH) )
Changed the default “fill_value” argument in Categorical.take ()
from True )
to False
( (GH)
Changed the default value for the raw argument in Series.rolling (). apply ()
, DataFrame.rolling (). Apply () , Series.expanding (). Apply ()
, and DataFrame.expanding (). apply ()
from None
False ( (GH)
))
Removed deprecated behavior of Series.argmin ()
) and Series () , use Series.idxmin () and Series.idxmax () fo r the old behavior ( (GH)
Passing a tz-aware datetime. datetime
or Timestamp
into the Timestamp
constructor with the tz
argument now raises a ValueError
( (GH)
Removed Series.base
, Index.base
, Categorical.base
,
Series.flags , Index.flags , PeriodArray.flags , Series.strides , Index.strides
, Series. itemsize
, Index.itemsize , Series.data , Index.data
( (GH)
Changed Timedelta.resolution ()
to match the behavior of the standard library datetime.timedelta.resolution
, for the old behavior, use Timedelta.resolution_string ()
( (GH)
Removed Timestamp.weekday_name
, DatetimeIndex.weekday_name , and Series.dt.weekday_name
( (GH)
Removed the previously deprecated keyword “errors” in Timestamp.tz_localize ()
, DatetimeIndex.tz_localize ()
, and series.tz_localize () (
Changed the default “ordered” argument in CategoricalDtype
from None
to False
( (GH)
Series.set_axis ()
and DataFrame.set_axis ()
) now require “labels” as the first argument and “axis” as an optional named parameter ( (GH)
Removed to_msgpack
.
, read_msgpack , DataFrame.to_msgpack
, Series.to_msgpack
(
)
Removed Series.compress
( (GH)
Removed the previously deprecated keyword “fill_value” from
Categorical.fillna ()
, use “value” instead ( (GH) )
Removed the previously deprecated keyword “data” from
andrews_curves ()
Removed the previously deprecated keyword “data” from
parallel_coordinates ()
Removed the previously deprecated keyword “colors” from
parallel_coordinates ()
, use “color” instead ( (GH)
Removed the previously deprecated keywords “verbose” and “private_key” from read_gbq ()
Calling np.array
and np.asarray
on tz-aware Series
and DatetimeIndex will now return an object array of tz- aware Timestamp
(
(GH)
GIPHY App Key not set. Please check settings