What’s new in 1.0.2 (March 12, 2020)

These are the changes in pandas 1.0.2. See Release notes for a full changelog including other versions of pandas.

Fixed regressions

Groupby

I/O

  • Fixed regression in read_csv() in which the encoding option was not recognized with certain file-like objects (GH 31819)

  • Fixed regression in DataFrame.to_excel() when the columns keyword argument is passed (GH 31677)

  • Fixed regression in ExcelFile where the stream passed into the function was closed by the destructor. (GH 31467)

  • Fixed regression where read_pickle() raised a UnicodeDecodeError when reading a py27 pickle with MultiIndex column (GH 31988).

Reindexing/alignment

Other

Indexing with nullable boolean arrays

Previously indexing with a nullable Boolean array containing NA would raise a ValueError, however this is now permitted with NA being treated as False. (GH 31503)

In [1]: s = pd.Series([1, 2, 3, 4])

In [2]: mask = pd.array([True, True, False, None], dtype="boolean")

In [3]: s
Out[3]: 
0    1
1    2
2    3
3    4
dtype: int64

In [4]: mask
Out[4]: 
<BooleanArray>
[True, True, False, <NA>]
Length: 4, dtype: boolean

pandas 1.0.0-1.0.1

>>> s[mask]
Traceback (most recent call last):
...
ValueError: cannot mask with array containing NA / NaN values

pandas 1.0.2

In [5]: s[mask]
Out[5]: 
0    1
1    2
dtype: int64

Bug fixes

Datetimelike

Categorical

I/O

  • Using pd.NA with DataFrame.to_json() now correctly outputs a null value instead of an empty object (GH 31615)

  • Bug in pandas.json_normalize() when value in meta path is not iterable (GH 31507)

  • Fixed pickling of pandas.NA. Previously a new object was returned, which broke computations relying on NA being a singleton (GH 31847)

  • Fixed bug in parquet roundtrip with nullable unsigned integer dtypes (GH 31896).

Experimental dtypes

Strings

Rolling

  • Fixed rolling operations with variable window (defined by time duration) on decreasing time index (GH 32385).

Contributors

For contributors, please see /usr/share/doc/contributors_list.txt or https://github.com/pandas-dev/pandas/graphs/contributors