pandas.Series.is_monotonic_increasing#
- property Series.is_monotonic_increasing[source]#
Return True if values in the object are monotonically increasing.
This property checks whether each element is greater than or equal to the previous element. Equal consecutive values are considered monotonically increasing.
- Returns:
- bool
See also
Series.is_monotonic_decreasingReturn boolean if values in the object are monotonically decreasing.
Examples
>>> s = pd.Series([1, 2, 2]) >>> s.is_monotonic_increasing True
>>> s = pd.Series([3, 2, 1]) >>> s.is_monotonic_increasing False