What’s new in 0.23.2 (July 5, 2018)#
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 (GH 20552)
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#
DataFrame.all()
and DataFrame.any()
now accept axis=None
to reduce over all axes to a scalar (GH 19976)
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:
>>> # 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 regressions#
Fixed regression in
to_csv()
when handling file-like object incorrectly (GH 21471)Re-allowed duplicate level names of a
MultiIndex
. Accessing a level that has a duplicate name by name still raises an error (GH 19029).Bug in both
DataFrame.first_valid_index()
andSeries.first_valid_index()
raised for a row index having duplicate values (GH 21441)Fixed printing of DataFrames with hierarchical columns with long names (GH 21180)
Fixed regression in
reindex()
andgroupby()
with a MultiIndex or multiple keys that contains categorical datetime-like values (GH 21390).Fixed regression in unary negative operations with object dtype (GH 21380)
Bug in
Timestamp.ceil()
andTimestamp.floor()
when timestamp is a multiple of the rounding frequency (GH 21262)Fixed regression in
to_clipboard()
that defaulted to copying dataframes with space delimited instead of tab delimited (GH 21104)
Build changes#
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()
. (GH 19320)
Bug fixes#
Conversion
Bug in constructing
Index
with an iterator or generator (GH 21470)Bug in
Series.nlargest()
for signed and unsigned integer dtypes when the minimum value is present (GH 21426)
Indexing
Bug in
Index.get_indexer_non_unique()
with categorical key (GH 21448)Bug in comparison operations for
MultiIndex
where error was raised on equality / inequality comparison involving a MultiIndex withnlevels == 1
(GH 21149)Bug in
DataFrame.drop()
behaviour is not consistent for unique and non-unique indexes (GH 21494)Bug in
DataFrame.duplicated()
with a large number of columns causing a ‘maximum recursion depth exceeded’ (GH 21524).
I/O
Bug in
read_csv()
that caused it to incorrectly raise an error whennrows=0
,low_memory=True
, andindex_col
was notNone
(GH 21141)Bug in
json_normalize()
when formatting therecord_prefix
with integer columns (GH 21536)
Categorical
Timezones
Bug in
Timestamp
andDatetimeIndex
where passing aTimestamp
localized after a DST transition would return a datetime before the DST transition (GH 20854)Bug in comparing
DataFrame
with tz-awareDatetimeIndex
columns with a DST transition that raised aKeyError
(GH 19970)Bug in
DatetimeIndex.shift()
where anAssertionError
would raise when shifting across DST (GH 8616)Bug in
Timestamp
constructor where passing an invalid timezone offset designator (Z
) would not raise aValueError
(GH 8910)Bug in
Timestamp.replace()
where replacing at a DST boundary would retain an incorrect offset (GH 7825)Bug in
DatetimeIndex.reindex()
when reindexing a tz-naive and tz-awareDatetimeIndex
(GH 8306)Bug in
DatetimeIndex.resample()
when downsampling across a DST boundary (GH 8531)
Timedelta
Contributors#
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