This is a minor bug-fix release in the 0.23.x series and includes some small regression fixes and bug fixes. We recommend that all users upgrade to this version.
Note
pandas 0.23.2 is first pandas release that’s compatible with Python 3.7 (GH20552)
Warning
Starting January 1, 2019, pandas feature releases will support Python 3 only. See Dropping Python 2.7 for more.
What’s new in v0.23.2
Logical reductions over entire DataFrame
Fixed regressions
Build changes
Bug fixes
Contributors
DataFrame.all() and DataFrame.any() now accept axis=None to reduce over all axes to a scalar (GH19976)
DataFrame.all()
DataFrame.any()
axis=None
In [1]: df = pd.DataFrame({"A": [1, 2], "B": [True, False]}) In [2]: df.all(axis=None) Out[2]: False
This also provides compatibility with NumPy 1.15, which now dispatches to DataFrame.all. With NumPy 1.15 and pandas 0.23.1 or earlier, numpy.all() will no longer reduce over every axis:
DataFrame.all
numpy.all()
>>> # NumPy 1.15, pandas 0.23.1 >>> np.any(pd.DataFrame({"A": [False], "B": [False]})) A False B False dtype: bool
With pandas 0.23.2, that will correctly return False, as it did with NumPy < 1.15.
In [3]: np.any(pd.DataFrame({"A": [False], "B": [False]})) Out[3]: False
Fixed regression in to_csv() when handling file-like object incorrectly (GH21471)
to_csv()
Re-allowed duplicate level names of a MultiIndex. Accessing a level that has a duplicate name by name still raises an error (GH19029).
MultiIndex
Bug in both DataFrame.first_valid_index() and Series.first_valid_index() raised for a row index having duplicate values (GH21441)
DataFrame.first_valid_index()
Series.first_valid_index()
Fixed printing of DataFrames with hierarchical columns with long names (GH21180)
Fixed regression in reindex() and groupby() with a MultiIndex or multiple keys that contains categorical datetime-like values (GH21390).
reindex()
groupby()
Fixed regression in unary negative operations with object dtype (GH21380)
Bug in Timestamp.ceil() and Timestamp.floor() when timestamp is a multiple of the rounding frequency (GH21262)
Timestamp.ceil()
Timestamp.floor()
Fixed regression in to_clipboard() that defaulted to copying dataframes with space delimited instead of tab delimited (GH21104)
to_clipboard()
The source and binary distributions no longer include test data files, resulting in smaller download sizes. Tests relying on these data files will be skipped when using pandas.test(). (GH19320)
pandas.test()
Conversion
Bug in constructing Index with an iterator or generator (GH21470)
Index
Bug in Series.nlargest() for signed and unsigned integer dtypes when the minimum value is present (GH21426)
Series.nlargest()
Indexing
Bug in Index.get_indexer_non_unique() with categorical key (GH21448)
Index.get_indexer_non_unique()
Bug in comparison operations for MultiIndex where error was raised on equality / inequality comparison involving a MultiIndex with nlevels == 1 (GH21149)
nlevels == 1
Bug in DataFrame.drop() behaviour is not consistent for unique and non-unique indexes (GH21494)
DataFrame.drop()
Bug in DataFrame.duplicated() with a large number of columns causing a ‘maximum recursion depth exceeded’ (GH21524).
DataFrame.duplicated()
I/O
Bug in read_csv() that caused it to incorrectly raise an error when nrows=0, low_memory=True, and index_col was not None (GH21141)
read_csv()
nrows=0
low_memory=True
index_col
None
Bug in json_normalize() when formatting the record_prefix with integer columns (GH21536)
json_normalize()
record_prefix
Categorical
Bug in rendering Series with Categorical dtype in rare conditions under Python 2.7 (GH21002)
Series
Timezones
Bug in Timestamp and DatetimeIndex where passing a Timestamp localized after a DST transition would return a datetime before the DST transition (GH20854)
Timestamp
DatetimeIndex
Bug in comparing DataFrame with tz-aware DatetimeIndex columns with a DST transition that raised a KeyError (GH19970)
DataFrame
KeyError
Bug in DatetimeIndex.shift() where an AssertionError would raise when shifting across DST (GH8616)
DatetimeIndex.shift()
AssertionError
Bug in Timestamp constructor where passing an invalid timezone offset designator (Z) would not raise a ValueError (GH8910)
Z
ValueError
Bug in Timestamp.replace() where replacing at a DST boundary would retain an incorrect offset (GH7825)
Timestamp.replace()
Bug in DatetimeIndex.reindex() when reindexing a tz-naive and tz-aware DatetimeIndex (GH8306)
DatetimeIndex.reindex()
Bug in DatetimeIndex.resample() when downsampling across a DST boundary (GH8531)
DatetimeIndex.resample()
Timedelta
Bug in Timedelta where non-zero timedeltas shorter than 1 microsecond were considered False (GH21484)
A total of 17 people contributed patches to this release. People with a “+” by their names contributed a patch for the first time.
David Krych
Jacopo Rota +
Jeff Reback
Jeremy Schendel
Joris Van den Bossche
Kalyan Gokhale
Matthew Roeschke
Michael Odintsov +
Ming Li
Pietro Battiston
Tom Augspurger
Uddeshya Singh
Vu Le +
alimcmaster1 +
david-liu-brattle-1 +
gfyoung
jbrockmendel