diff --git a/doc/redirects.csv b/doc/redirects.csv index d0f4ae331f7e3..a1d3207033057 100644 --- a/doc/redirects.csv +++ b/doc/redirects.csv @@ -671,7 +671,6 @@ generated/pandas.Index.is_integer,../reference/api/pandas.Index.is_integer generated/pandas.Index.is_interval,../reference/api/pandas.Index.is_interval generated/pandas.Index.is_lexsorted_for_tuple,../reference/api/pandas.Index.is_lexsorted_for_tuple generated/pandas.Index.is_monotonic_decreasing,../reference/api/pandas.Index.is_monotonic_decreasing -generated/pandas.Index.is_monotonic,../reference/api/pandas.Index.is_monotonic generated/pandas.Index.is_monotonic_increasing,../reference/api/pandas.Index.is_monotonic_increasing generated/pandas.Index.isna,../reference/api/pandas.Index.isna generated/pandas.Index.isnull,../reference/api/pandas.Index.isnull @@ -1068,7 +1067,6 @@ generated/pandas.Series.interpolate,../reference/api/pandas.Series.interpolate generated/pandas.Series.is_copy,../reference/api/pandas.Series.is_copy generated/pandas.Series.isin,../reference/api/pandas.Series.isin generated/pandas.Series.is_monotonic_decreasing,../reference/api/pandas.Series.is_monotonic_decreasing -generated/pandas.Series.is_monotonic,../reference/api/pandas.Series.is_monotonic generated/pandas.Series.is_monotonic_increasing,../reference/api/pandas.Series.is_monotonic_increasing generated/pandas.Series.isna,../reference/api/pandas.Series.isna generated/pandas.Series.isnull,../reference/api/pandas.Series.isnull diff --git a/doc/source/reference/indexing.rst b/doc/source/reference/indexing.rst index b7866a0076d84..af4130f2e8961 100644 --- a/doc/source/reference/indexing.rst +++ b/doc/source/reference/indexing.rst @@ -25,7 +25,6 @@ Properties :toctree: api/ Index.values - Index.is_monotonic Index.is_monotonic_increasing Index.is_monotonic_decreasing Index.is_unique diff --git a/doc/source/reference/series.rst b/doc/source/reference/series.rst index c9604f48dd334..c8bbe922f5313 100644 --- a/doc/source/reference/series.rst +++ b/doc/source/reference/series.rst @@ -167,7 +167,6 @@ Computations / descriptive stats Series.unique Series.nunique Series.is_unique - Series.is_monotonic Series.is_monotonic_increasing Series.is_monotonic_decreasing Series.value_counts diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index d71160cdbc369..e68f5aa074229 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -265,6 +265,7 @@ Removal of prior version deprecations/changes - Removed :func:`is_extension_type` in favor of :func:`is_extension_array_dtype` (:issue:`29457`) - Removed ``.ExponentialMovingWindow.vol`` (:issue:`39220`) - Removed :meth:`Index.get_value` and :meth:`Index.set_value` (:issue:`33907`, :issue:`28621`) +- Removed :meth:`Series.is_monotonic` and :meth:`Index.is_monotonic` in favor of :meth:`Series.is_monotonic_increasing` and :meth:`Index.is_monotonic_increasing` (:issue:`45422`) - Removed :meth:`Series.slice_shift` and :meth:`DataFrame.slice_shift` (:issue:`37601`) - Remove :meth:`DataFrameGroupBy.pad` and :meth:`DataFrameGroupBy.backfill` (:issue:`45076`) - Remove ``numpy`` argument from :func:`read_json` (:issue:`30636`) diff --git a/pandas/core/base.py b/pandas/core/base.py index 2145ecd10a7b0..afcab23e130cd 100644 --- a/pandas/core/base.py +++ b/pandas/core/base.py @@ -17,7 +17,6 @@ final, overload, ) -import warnings import numpy as np @@ -38,7 +37,6 @@ cache_readonly, doc, ) -from pandas.util._exceptions import find_stack_level from pandas.core.dtypes.common import ( is_categorical_dtype, @@ -1062,27 +1060,6 @@ def is_unique(self) -> bool: """ return self.nunique(dropna=False) == len(self) - @property - def is_monotonic(self) -> bool: - """ - Return boolean if values in the object are monotonically increasing. - - .. deprecated:: 1.5.0 - is_monotonic is deprecated and will be removed in a future version. - Use is_monotonic_increasing instead. - - Returns - ------- - bool - """ - warnings.warn( - "is_monotonic is deprecated and will be removed in a future version. " - "Use is_monotonic_increasing instead.", - FutureWarning, - stacklevel=find_stack_level(), - ) - return self.is_monotonic_increasing - @property def is_monotonic_increasing(self) -> bool: """ diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index b2ea46ce1399e..ac70591032355 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -2197,24 +2197,6 @@ def _can_hold_na(self) -> bool: return False return True - @final - @property - def is_monotonic(self) -> bool: - """ - Alias for is_monotonic_increasing. - - .. deprecated:: 1.5.0 - is_monotonic is deprecated and will be removed in a future version. - Use is_monotonic_increasing instead. - """ - warnings.warn( - "is_monotonic is deprecated and will be removed in a future version. " - "Use is_monotonic_increasing instead.", - FutureWarning, - stacklevel=find_stack_level(), - ) - return self.is_monotonic_increasing - @property def is_monotonic_increasing(self) -> bool: """