What’s new in 0.25.1 (August 21, 2019)¶
These are the changes in pandas 0.25.1. See Release notes for a full changelog including other versions of pandas.
IO and LZMA¶
Some users may unknowingly have an incomplete Python installation lacking the lzma module from the standard library. In this case, import pandas failed due to an ImportError (GH27575).
pandas will now warn, rather than raising an ImportError if the lzma module is not present. Any subsequent attempt to use lzma methods will raise a RuntimeError.
A possible fix for the lack of the lzma module is to ensure you have the necessary libraries and then re-install Python.
For example, on MacOS installing Python with pyenv may lead to an incomplete Python installation due to unmet system dependencies at compilation time (like xz). Compilation will succeed, but Python might fail at run time. The issue can be solved by installing the necessary dependencies and then re-installing Python.
Bug fixes¶
Categorical¶
Bug in
Categorical.fillna()that would replace all values, not just those that areNaN(GH26215)
Datetimelike¶
Bug in
to_datetime()where passing a timezone-naiveDatetimeArrayorDatetimeIndexandutc=Truewould incorrectly return a timezone-naive result (GH27733)Bug in
Period.to_timestamp()where aPeriodoutside theTimestampimplementation bounds (roughly 1677-09-21 to 2262-04-11) would return an incorrectTimestampinstead of raisingOutOfBoundsDatetime(GH19643)Bug in iterating over
DatetimeIndexwhen the underlying data is read-only (GH28055)
Timezones¶
Bug in
Indexwhere a numpy object array with a timezone awareTimestampandnp.nanwould not return aDatetimeIndex(GH27011)
Numeric¶
Bug in
Series.interpolate()when using a timezone awareDatetimeIndex(GH27548)Bug when printing negative floating point complex numbers would raise an
IndexError(GH27484)Bug where
DataFramearithmetic operators such asDataFrame.mul()with aSerieswith axis=1 would raise anAttributeErroronDataFramelarger than the minimum threshold to invoke numexpr (GH27636)Bug in
DataFramearithmetic where missing values in results were incorrectly masked withNaNinstead ofInf(GH27464)
Conversion¶
Improved the warnings for the deprecated methods
Series.real()andSeries.imag()(GH27610)
Indexing¶
Bug in partial-string indexing returning a NumPy array rather than a
Serieswhen indexing with a scalar like.loc['2015'](GH27516)Break reference cycle involving
Indexand other index classes to allow garbage collection of index objects without running the GC. (GH27585, GH27840)Fix regression in assigning values to a single column of a DataFrame with a
MultiIndexcolumns (GH27841).Fix regression in
.ixfallback with anIntervalIndex(GH27865).
Missing¶
Bug in
pandas.isnull()orpandas.isna()when the input is a type e.g.type(pandas.Series())(GH27482)
IO¶
Avoid calling
S3File.s3when reading parquet, as this was removed in s3fs version 0.3.0 (GH27756)Better error message when a negative header is passed in
pandas.read_csv()(GH27779)Follow the
min_rowsdisplay option (introduced in v0.25.0) correctly in the HTML repr in the notebook (GH27991).
Plotting¶
Added a
pandas_plotting_backendsentrypoint group for registering plot backends. See Plotting backends for more (GH26747).Fixed the re-instatement of Matplotlib datetime converters after calling
pandas.plotting.deregister_matplotlib_converters()(GH27481).Fix compatibility issue with matplotlib when passing a pandas
Indexto a plot call (GH27775).
GroupBy/resample/rolling¶
Fixed regression in
pands.core.groupby.DataFrameGroupBy.quantile()raising when multiple quantiles are given (GH27526)Bug in
pandas.core.groupby.DataFrameGroupBy.transform()where applying a timezone conversion lambda function would drop timezone information (GH27496)Bug in
pandas.core.groupby.GroupBy.nth()whereobserved=Falsewas being ignored for Categorical groupers (GH26385)Bug in windowing over read-only arrays (GH27766)
Fixed segfault in
pandas.core.groupby.DataFrameGroupBy.quantilewhen an invalid quantile was passed (GH27470)
Reshaping¶
A
KeyErroris now raised if.unstack()is called on aSeriesorDataFramewith a flatIndexpassing a name which is not the correct one (GH18303)Bug
merge_asof()could not mergeTimedeltaobjects when passingtolerancekwarg (GH27642)Bug in
DataFrame.crosstab()whenmarginsset toTrueandnormalizeis notFalse, an error is raised. (GH27500)DataFrame.join()now suppresses theFutureWarningwhen the sort parameter is specified (GH21952)Bug in
DataFrame.join()raising with readonly arrays (GH27943)
Contributors¶
A total of 5 people contributed patches to this release. People with a “+” by their names contributed a patch for the first time.
Jeff Reback
Joris Van den Bossche
MeeseeksMachine +
Tom Augspurger
jbrockmendel