Skip to content

Commit 8c3883d

Browse files
DOC: whatsnew fixups (#30624)
1 parent b804372 commit 8c3883d

File tree

1 file changed

+17
-51
lines changed

1 file changed

+17
-51
lines changed

doc/source/whatsnew/v1.0.0.rst

+17-51
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ You can use the alias ``"boolean"`` as well.
174174
Using Numba in ``rolling.apply``
175175
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
176176

177-
We've added an ``engine`` keyword to :meth:`~Rolling.apply` that allows the user to execute the
177+
We've added an ``engine`` keyword to :meth:`~core.window.rolling.Rolling.apply` that allows the user to execute the
178178
routine using `Numba <https://numba.pydata.org/>`__ instead of Cython. Using the Numba engine
179179
can yield significant performance gains if the apply function can operate on numpy arrays and
180180
the data set is larger (1 million rows or greater). For more details, see
@@ -298,45 +298,6 @@ New repr for :class:`~pandas.arrays.IntervalArray`
298298
pd.arrays.IntervalArray.from_tuples([(0, 1), (2, 3)])
299299
300300
301-
All :class:`SeriesGroupBy` aggregation methods now respect the ``observed`` keyword
302-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
303-
The following methods now also correctly output values for unobserved categories when called through ``groupby(..., observed=False)`` (:issue:`17605`)
304-
305-
- :meth:`SeriesGroupBy.count`
306-
- :meth:`SeriesGroupBy.size`
307-
- :meth:`SeriesGroupBy.nunique`
308-
- :meth:`SeriesGroupBy.nth`
309-
310-
.. ipython:: python
311-
312-
df = pd.DataFrame({
313-
"cat_1": pd.Categorical(list("AABB"), categories=list("ABC")),
314-
"cat_2": pd.Categorical(list("AB") * 2, categories=list("ABC")),
315-
"value": [0.1] * 4,
316-
})
317-
df
318-
319-
320-
*pandas 0.25.x*
321-
322-
.. code-block:: ipython
323-
324-
In [2]: df.groupby(["cat_1", "cat_2"], observed=False)["value"].count()
325-
Out[2]:
326-
cat_1 cat_2
327-
A A 1
328-
B 1
329-
B A 1
330-
B 1
331-
Name: value, dtype: int64
332-
333-
334-
*pandas 1.0.0*
335-
336-
.. ipython:: python
337-
338-
df.groupby(["cat_1", "cat_2"], observed=False)["value"].count()
339-
340301
:meth:`pandas.array` inference changes
341302
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
342303

@@ -540,7 +501,7 @@ Other API changes
540501
^^^^^^^^^^^^^^^^^
541502

542503
- Bumped the minimum supported version of ``s3fs`` from 0.0.8 to 0.3.0 (:issue:`28616`)
543-
- :class:`pandas.core.groupby.GroupBy.transform` now raises on invalid operation names (:issue:`27489`)
504+
- :class:`core.groupby.GroupBy.transform` now raises on invalid operation names (:issue:`27489`)
544505
- :meth:`pandas.api.types.infer_dtype` will now return "integer-na" for integer and ``np.nan`` mix (:issue:`27283`)
545506
- :meth:`MultiIndex.from_arrays` will no longer infer names from arrays if ``names=None`` is explicitly provided (:issue:`27292`)
546507
- In order to improve tab-completion, Pandas does not include most deprecated attributes when introspecting a pandas object using ``dir`` (e.g. ``dir(df)``).
@@ -645,7 +606,7 @@ or ``matplotlib.Axes.plot``. See :ref:`plotting.formatters` for more.
645606
- :meth:`DataFrame.to_excel` and :meth:`Series.to_excel` with non-existent columns will no longer reindex (:issue:`17295`)
646607
- Removed the previously deprecated keyword "join_axes" from :func:`concat`; use ``reindex_like`` on the result instead (:issue:`22318`)
647608
- Removed the previously deprecated keyword "by" from :meth:`DataFrame.sort_index`, use :meth:`DataFrame.sort_values` instead (:issue:`10726`)
648-
- Removed support for nested renaming in :meth:`DataFrame.aggregate`, :meth:`Series.aggregate`, :meth:`DataFrameGroupBy.aggregate`, :meth:`SeriesGroupBy.aggregate`, :meth:`Rolling.aggregate` (:issue:`18529`)
609+
- Removed support for nested renaming in :meth:`DataFrame.aggregate`, :meth:`Series.aggregate`, :meth:`core.groupby.DataFrameGroupBy.aggregate`, :meth:`core.groupby.SeriesGroupBy.aggregate`, :meth:`core.window.rolling.Rolling.aggregate` (:issue:`18529`)
649610
- Passing ``datetime64`` data to :class:`TimedeltaIndex` or ``timedelta64`` data to ``DatetimeIndex`` now raises ``TypeError`` (:issue:`23539`, :issue:`23937`)
650611
- Passing ``int64`` values to :class:`DatetimeIndex` and a timezone now interprets the values as nanosecond timestamps in UTC, not wall times in the given timezone (:issue:`24559`)
651612
- A tuple passed to :meth:`DataFrame.groupby` is now exclusively treated as a single key (:issue:`18314`)
@@ -685,7 +646,7 @@ or ``matplotlib.Axes.plot``. See :ref:`plotting.formatters` for more.
685646
- Removed the previously deprecated ``FrozenNDArray`` class in ``pandas.core.indexes.frozen`` (:issue:`29335`)
686647
- Removed the previously deprecated keyword "nthreads" from :func:`read_feather`, use "use_threads" instead (:issue:`23053`)
687648
- Removed :meth:`Index.is_lexsorted_for_tuple` (:issue:`29305`)
688-
- Removed support for nested renaming in :meth:`DataFrame.aggregate`, :meth:`Series.aggregate`, :meth:`DataFrameGroupBy.aggregate`, :meth:`SeriesGroupBy.aggregate`, :meth:`Rolling.aggregate` (:issue:`29608`)
649+
- Removed support for nested renaming in :meth:`DataFrame.aggregate`, :meth:`Series.aggregate`, :meth:`core.groupby.DataFrameGroupBy.aggregate`, :meth:`core.groupby.SeriesGroupBy.aggregate`, :meth:`core.window.rolling.Rolling.aggregate` (:issue:`29608`)
689650
- Removed :meth:`Series.valid`; use :meth:`Series.dropna` instead (:issue:`18800`)
690651
- Removed :attr:`DataFrame.is_copy`, :attr:`Series.is_copy` (:issue:`18812`)
691652
- Removed :meth:`DataFrame.get_ftype_counts`, :meth:`Series.get_ftype_counts` (:issue:`18243`)
@@ -774,6 +735,11 @@ Categorical
774735
:class:`Categorical` with duplicate entries, the accessor was skipping duplicates (:issue:`27952`)
775736
- Bug in :meth:`DataFrame.replace` and :meth:`Series.replace` that would give incorrect results on categorical data (:issue:`26988`)
776737
- Bug where calling :meth:`Categorical.min` or :meth:`Categorical.max` on an empty Categorical would raise a numpy exception (:issue:`30227`)
738+
- The following methods now also correctly output values for unobserved categories when called through ``groupby(..., observed=False)`` (:issue:`17605`)
739+
* :meth:`core.groupby.SeriesGroupBy.count`
740+
* :meth:`core.groupby.SeriesGroupBy.size`
741+
* :meth:`core.groupby.SeriesGroupBy.nunique`
742+
* :meth:`core.groupby.SeriesGroupBy.nth`
777743

778744

779745
Datetimelike
@@ -782,14 +748,14 @@ Datetimelike
782748
- Bug in :meth:`Series.dt` property lookups when the underlying data is read-only (:issue:`27529`)
783749
- Bug in ``HDFStore.__getitem__`` incorrectly reading tz attribute created in Python 2 (:issue:`26443`)
784750
- Bug in :func:`to_datetime` where passing arrays of malformed ``str`` with errors="coerce" could incorrectly lead to raising ``ValueError`` (:issue:`28299`)
785-
- Bug in :meth:`pandas.core.groupby.SeriesGroupBy.nunique` where ``NaT`` values were interfering with the count of unique values (:issue:`27951`)
751+
- Bug in :meth:`core.groupby.SeriesGroupBy.nunique` where ``NaT`` values were interfering with the count of unique values (:issue:`27951`)
786752
- Bug in :class:`Timestamp` subtraction when subtracting a :class:`Timestamp` from a ``np.datetime64`` object incorrectly raising ``TypeError`` (:issue:`28286`)
787753
- Addition and subtraction of integer or integer-dtype arrays with :class:`Timestamp` will now raise ``NullFrequencyError`` instead of ``ValueError`` (:issue:`28268`)
788754
- Bug in :class:`Series` and :class:`DataFrame` with integer dtype failing to raise ``TypeError`` when adding or subtracting a ``np.datetime64`` object (:issue:`28080`)
789755
- Bug in :meth:`Series.astype`, :meth:`Index.astype`, and :meth:`DataFrame.astype` failing to handle ``NaT`` when casting to an integer dtype (:issue:`28492`)
790756
- Bug in :class:`Week` with ``weekday`` incorrectly raising ``AttributeError`` instead of ``TypeError`` when adding or subtracting an invalid type (:issue:`28530`)
791757
- Bug in :class:`DataFrame` arithmetic operations when operating with a :class:`Series` with dtype `'timedelta64[ns]'` (:issue:`28049`)
792-
- Bug in :func:`pandas.core.groupby.generic.SeriesGroupBy.apply` raising ``ValueError`` when a column in the original DataFrame is a datetime and the column labels are not standard integers (:issue:`28247`)
758+
- Bug in :func:`core.groupby.generic.SeriesGroupBy.apply` raising ``ValueError`` when a column in the original DataFrame is a datetime and the column labels are not standard integers (:issue:`28247`)
793759
- Bug in :func:`pandas._config.localization.get_locales` where the ``locales -a`` encodes the locales list as windows-1252 (:issue:`23638`, :issue:`24760`, :issue:`27368`)
794760
- Bug in :meth:`Series.var` failing to raise ``TypeError`` when called with ``timedelta64[ns]`` dtype (:issue:`28289`)
795761
- Bug in :meth:`DatetimeIndex.strftime` and :meth:`Series.dt.strftime` where ``NaT`` was converted to the string ``'NaT'`` instead of ``np.nan`` (:issue:`29578`)
@@ -924,24 +890,24 @@ Plotting
924890
Groupby/resample/rolling
925891
^^^^^^^^^^^^^^^^^^^^^^^^
926892

927-
- Bug in :meth:`DataFrame.groupby.apply` only showing output from a single group when function returns an :class:`Index` (:issue:`28652`)
893+
- Bug in :meth:`core.groupby.DataFrameGroupBy.apply` only showing output from a single group when function returns an :class:`Index` (:issue:`28652`)
928894
- Bug in :meth:`DataFrame.groupby` with multiple groups where an ``IndexError`` would be raised if any group contained all NA values (:issue:`20519`)
929895
- Bug in :meth:`pandas.core.resample.Resampler.size` and :meth:`pandas.core.resample.Resampler.count` returning wrong dtype when used with an empty series or dataframe (:issue:`28427`)
930896
- Bug in :meth:`DataFrame.rolling` not allowing for rolling over datetimes when ``axis=1`` (:issue:`28192`)
931897
- Bug in :meth:`DataFrame.rolling` not allowing rolling over multi-index levels (:issue:`15584`).
932898
- Bug in :meth:`DataFrame.rolling` not allowing rolling on monotonic decreasing time indexes (:issue:`19248`).
933899
- Bug in :meth:`DataFrame.groupby` not offering selection by column name when ``axis=1`` (:issue:`27614`)
934-
- Bug in :meth:`DataFrameGroupby.agg` not able to use lambda function with named aggregation (:issue:`27519`)
900+
- Bug in :meth:`core.groupby.DataFrameGroupby.agg` not able to use lambda function with named aggregation (:issue:`27519`)
935901
- Bug in :meth:`DataFrame.groupby` losing column name information when grouping by a categorical column (:issue:`28787`)
936902
- Remove error raised due to duplicated input functions in named aggregation in :meth:`DataFrame.groupby` and :meth:`Series.groupby`. Previously error will be raised if the same function is applied on the same column and now it is allowed if new assigned names are different. (:issue:`28426`)
937-
- :meth:`SeriesGroupBy.value_counts` will be able to handle the case even when the :class:`Grouper` makes empty groups (:issue: 28479)
938-
- Bug in :meth:`DataFrameGroupBy.rolling().quantile()` ignoring ``interpolation`` keyword argument (:issue:`28779`)
903+
- :meth:`core.groupby.SeriesGroupBy.value_counts` will be able to handle the case even when the :class:`Grouper` makes empty groups (:issue:`28479`)
904+
- Bug in :meth:`core.window.rolling.Rolling.quantile` ignoring ``interpolation`` keyword argument when used within a groupby (:issue:`28779`)
939905
- Bug in :meth:`DataFrame.groupby` where ``any``, ``all``, ``nunique`` and transform functions would incorrectly handle duplicate column labels (:issue:`21668`)
940-
- Bug in :meth:`DataFrameGroupBy.agg` with timezone-aware datetime64 column incorrectly casting results to the original dtype (:issue:`29641`)
906+
- Bug in :meth:`core.groupby.DataFrameGroupBy.agg` with timezone-aware datetime64 column incorrectly casting results to the original dtype (:issue:`29641`)
941907
- Bug in :meth:`DataFrame.groupby` when using axis=1 and having a single level columns index (:issue:`30208`)
942908
- Bug in :meth:`DataFrame.groupby` when using nunique on axis=1 (:issue:`30253`)
943909
- Bug in :meth:`GroupBy.quantile` with multiple list-like q value and integer column names (:issue:`30289`)
944-
- Bug in :meth:`GroupBy.pct_change` and :meth:`SeriesGroupBy.pct_change` causes ``TypeError`` when ``fill_method`` is ``None`` (:issue:`30463`)
910+
- Bug in :meth:`GroupBy.pct_change` and :meth:`core.groupby.SeriesGroupBy.pct_change` causes ``TypeError`` when ``fill_method`` is ``None`` (:issue:`30463`)
945911

946912
Reshaping
947913
^^^^^^^^^

0 commit comments

Comments
 (0)