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 (GH20552)

Warning

Starting January 1, 2019, pandas feature releases will support Python 3 only. See Plan for dropping Python 2.7 for more.

Logical reductions over entire DataFrame

DataFrame.all() and DataFrame.any() now accept axis=None to reduce over all axes to a scalar (GH19976)

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 (GH21471)
  • Re-allowed duplicate level names of a MultiIndex. Accessing a level that has a duplicate name by name still raises an error (GH19029).
  • Bug in both DataFrame.first_valid_index() and Series.first_valid_index() raised for a row index having duplicate values (GH21441)
  • 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).
  • 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)
  • Fixed regression in to_clipboard() that defaulted to copying dataframes with space delimited instead of tab delimited (GH21104)

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(). (GH19320)

Bug fixes

Conversion

Indexing

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)
  • Bug in json_normalize() when formatting the record_prefix with integer columns (GH21536)

Categorical

  • Bug in rendering Series with Categorical dtype in rare conditions under Python 2.7 (GH21002)

Timezones

  • Bug in Timestamp and DatetimeIndex where passing a Timestamp localized after a DST transition would return a datetime before the DST transition (GH20854)
  • Bug in comparing DataFrame with tz-aware DatetimeIndex columns with a DST transition that raised a KeyError (GH19970)
  • Bug in DatetimeIndex.shift() where an AssertionError would raise when shifting across DST (GH8616)
  • Bug in Timestamp constructor where passing an invalid timezone offset designator (Z) would not raise a ValueError (GH8910)
  • Bug in Timestamp.replace() where replacing at a DST boundary would retain an incorrect offset (GH7825)
  • Bug in DatetimeIndex.reindex() when reindexing a tz-naive and tz-aware DatetimeIndex (GH8306)
  • Bug in DatetimeIndex.resample() when downsampling across a DST boundary (GH8531)

Timedelta

  • Bug in Timedelta where non-zero timedeltas shorter than 1 microsecond were considered False (GH21484)

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
Scroll To Top