Skip to content

Latest commit

 

History

History
243 lines (165 loc) · 6.21 KB

v1.1.0.rst

File metadata and controls

243 lines (165 loc) · 6.21 KB

What's new in 1.1.0 (??)

These are the changes in pandas 1.1.0. See :ref:`release` for a full changelog including other versions of pandas.

{{ header }}

Enhancements

Nonmonotonic PeriodIndex Partial String Slicing

:class:`PeriodIndex` now supports partial string slicing for non-monotonic indexes, mirroring :class:`DatetimeIndex` behavior (:issue:`31096`)

For example:

.. ipython:: python

   dti = pd.date_range("2014-01-01", periods=30, freq="30D")
   pi = dti.to_period("D")
   ser_monotonic = pd.Series(np.arange(30), index=pi)
   shuffler = list(range(0, 30, 2)) + list(range(1, 31, 2))
   ser = ser_monotonic[shuffler]
   ser

.. ipython:: python

   ser["2014"]
   ser.loc["May 2015"]

Comparing two DataFrame or two Series and summarizing the differences

We've added :meth:`DataFrame.differences` and :meth:`Series.differences` for comparing two DataFrame or two Series (:issue:`30429`)

.. ipython:: python

   df = pd.DataFrame(
       {
           "col1": ["a", "a", "b", "b", "a"],
           "col2": [1.0, 2.0, 3.0, np.nan, 5.0],
           "col3": [1.0, 2.0, 3.0, 4.0, 5.0]
       },
       columns=["col1", "col2", "col3"],
   )
   df
   df2 = df.copy()
   df2.loc[0, 'col1'] = 'c'
   df2.loc[2, 'col3'] = 4.0
   df2
   df.differences(df2)


Other enhancements

Other API changes

Backwards incompatible API changes

Deprecations

Performance improvements

Bug fixes

Categorical

Datetimelike

Timedelta

Timezones

Numeric

Conversion

Strings

Interval

Indexing

Missing

MultiIndex

I/O

Plotting

Groupby/resample/rolling

Reshaping

Sparse

ExtensionArray

Other

  • Appending a dictionary to a :class:`DataFrame` without passing ignore_index=True will raise TypeError: Can only append a dict if ignore_index=True instead of TypeError: Can only append a Series if ignore_index=True or if the Series has a name (:issue:`30871`)

Contributors