diff --git a/doc/redirects.csv b/doc/redirects.csv index 33ba94e2baa015..1471bfb82c07c3 100644 --- a/doc/redirects.csv +++ b/doc/redirects.csv @@ -319,7 +319,6 @@ generated/pandas.DataFrame.clip_upper,../reference/api/pandas.DataFrame.clip_upp generated/pandas.DataFrame.columns,../reference/api/pandas.DataFrame.columns generated/pandas.DataFrame.combine_first,../reference/api/pandas.DataFrame.combine_first generated/pandas.DataFrame.combine,../reference/api/pandas.DataFrame.combine -generated/pandas.DataFrame.compound,../reference/api/pandas.DataFrame.compound generated/pandas.DataFrame.convert_objects,../reference/api/pandas.DataFrame.convert_objects generated/pandas.DataFrame.copy,../reference/api/pandas.DataFrame.copy generated/pandas.DataFrame.corr,../reference/api/pandas.DataFrame.corr @@ -950,7 +949,6 @@ generated/pandas.Series.clip_lower,../reference/api/pandas.Series.clip_lower generated/pandas.Series.clip_upper,../reference/api/pandas.Series.clip_upper generated/pandas.Series.combine_first,../reference/api/pandas.Series.combine_first generated/pandas.Series.combine,../reference/api/pandas.Series.combine -generated/pandas.Series.compound,../reference/api/pandas.Series.compound generated/pandas.Series.compress,../reference/api/pandas.Series.compress generated/pandas.Series.convert_objects,../reference/api/pandas.Series.convert_objects generated/pandas.Series.copy,../reference/api/pandas.Series.copy diff --git a/doc/source/getting_started/10min.rst b/doc/source/getting_started/10min.rst index 41520795bde62e..66e500131b316c 100644 --- a/doc/source/getting_started/10min.rst +++ b/doc/source/getting_started/10min.rst @@ -75,8 +75,8 @@ will be completed: df2.all df2.columns df2.any df2.combine df2.append df2.combine_first - df2.apply df2.compound - df2.applymap df2.consolidate + df2.apply df2.consolidate + df2.applymap df2.D As you can see, the columns ``A``, ``B``, ``C``, and ``D`` are automatically diff --git a/doc/source/reference/frame.rst b/doc/source/reference/frame.rst index 4c296d74b5ef90..8eeca1ec280544 100644 --- a/doc/source/reference/frame.rst +++ b/doc/source/reference/frame.rst @@ -137,7 +137,6 @@ Computations / descriptive stats DataFrame.all DataFrame.any DataFrame.clip - DataFrame.compound DataFrame.corr DataFrame.corrwith DataFrame.count diff --git a/doc/source/reference/series.rst b/doc/source/reference/series.rst index 1e17b72db2aaf0..807dc151dac4e0 100644 --- a/doc/source/reference/series.rst +++ b/doc/source/reference/series.rst @@ -174,7 +174,6 @@ Computations / descriptive stats Series.is_monotonic_increasing Series.is_monotonic_decreasing Series.value_counts - Series.compound Reindexing / selection / label manipulation ------------------------------------------- diff --git a/doc/source/whatsnew/v1.0.0.rst b/doc/source/whatsnew/v1.0.0.rst index 1a07b424fa8847..4198ddf4b7a2a0 100644 --- a/doc/source/whatsnew/v1.0.0.rst +++ b/doc/source/whatsnew/v1.0.0.rst @@ -535,6 +535,7 @@ or ``matplotlib.Axes.plot``. See :ref:`plotting.formatters` for more. - Removed the previously deprecated :meth:`Index.summary` (:issue:`18217`) - Removed the previously deprecated "fastpath" keyword from the :class:`Index` constructor (:issue:`23110`) - Removed the previously deprecated :meth:`Series.get_value`, :meth:`Series.set_value`, :meth:`DataFrame.get_value`, :meth:`DataFrame.set_value` (:issue:`17739`) +- Removed the previously deprecated :meth:`Series.compound` and :meth:`DataFrame.compound` (:issue:`26405`) - Changed the the default value of `inplace` in :meth:`DataFrame.set_index` and :meth:`Series.set_axis`. It now defaults to ``False`` (:issue:`27600`) - Removed the previously deprecated :attr:`Series.cat.categorical`, :attr:`Series.cat.index`, :attr:`Series.cat.name` (:issue:`24751`) - Removed the previously deprecated ``time_rule`` keyword from (non-public) :func:`offsets.generate_range`, which has been moved to :func:`core.arrays._ranges.generate_range` (:issue:`24157`) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index efdcfa7edbba3e..bcc742e731110e 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -10117,29 +10117,6 @@ def mad(self, axis=None, skipna=None, level=None): nanops.nanstd, ) - @Substitution( - desc="Return the compound percentage of the values for " - "the requested axis.\n\n.. deprecated:: 0.25.0", - name1=name, - name2=name2, - axis_descr=axis_descr, - min_count="", - see_also="", - examples="", - ) - @Appender(_num_doc) - def compound(self, axis=None, skipna=None, level=None): - msg = ( - "The 'compound' method is deprecated and will be" - "removed in a future version." - ) - warnings.warn(msg, FutureWarning, stacklevel=2) - if skipna is None: - skipna = True - return (1 + self).prod(axis=axis, skipna=skipna, level=level) - 1 - - cls.compound = compound - cls.cummin = _make_cum_function( cls, "cummin", diff --git a/pandas/tests/series/test_analytics.py b/pandas/tests/series/test_analytics.py index 71b4819bb4da82..c6c960910214a0 100644 --- a/pandas/tests/series/test_analytics.py +++ b/pandas/tests/series/test_analytics.py @@ -1276,15 +1276,6 @@ def test_validate_stat_keepdims(self): with pytest.raises(ValueError, match=msg): np.sum(s, keepdims=True) - def test_compound_deprecated(self): - s = Series([0.1, 0.2, 0.3, 0.4]) - with tm.assert_produces_warning(FutureWarning): - s.compound() - - df = pd.DataFrame({"s": s}) - with tm.assert_produces_warning(FutureWarning): - df.compound() - main_dtypes = [ "datetime",