diff --git a/third_party/bigframes_vendored/pandas/core/series.py b/third_party/bigframes_vendored/pandas/core/series.py index 10a4c195ab..1aa4ffffbb 100644 --- a/third_party/bigframes_vendored/pandas/core/series.py +++ b/third_party/bigframes_vendored/pandas/core/series.py @@ -2711,6 +2711,31 @@ def argmax(self): If the minimum is achieved in multiple locations, the first row position is returned. + **Examples:** + + >>> import bigframes.pandas as bpd + >>> bpd.options.display.progress_bar = None + + Consider dataset containing cereal calories. + + >>> s = bpd.Series({'Corn Flakes': 100.0, 'Almond Delight': 110.0, + ... 'Cinnamon Toast Crunch': 120.0, 'Cocoa Puff': 110.0}) + >>> s + Corn Flakes 100.0 + Almond Delight 110.0 + Cinnamon Toast Crunch 120.0 + Cocoa Puff 110.0 + dtype: Float64 + + >>> s.argmax() + 2 + + >>> s.argmin() + 0 + + The maximum cereal calories is the third element and the minimum cereal + calories is the first element, since series is zero-indexed. + Returns: Series: Row position of the maximum value. """ @@ -2722,6 +2747,31 @@ def argmin(self): If the maximum is achieved in multiple locations, the first row position is returned. + **Examples:** + + >>> import bigframes.pandas as bpd + >>> bpd.options.display.progress_bar = None + + Consider dataset containing cereal calories. + + >>> s = bpd.Series({'Corn Flakes': 100.0, 'Almond Delight': 110.0, + ... 'Cinnamon Toast Crunch': 120.0, 'Cocoa Puff': 110.0}) + >>> s + Corn Flakes 100.0 + Almond Delight 110.0 + Cinnamon Toast Crunch 120.0 + Cocoa Puff 110.0 + dtype: Float64 + + >>> s.argmax() + 2 + + >>> s.argmin() + 0 + + The maximum cereal calories is the third element and the minimum cereal + calories is the first element, since series is zero-indexed. + Returns: Series: Row position of the minimum value. """ @@ -2971,6 +3021,19 @@ def is_monotonic_increasing(self) -> bool: """ Return boolean if values in the object are monotonically increasing. + **Examples:** + + >>> import bigframes.pandas as bpd + >>> bpd.options.display.progress_bar = None + + >>> s = bpd.Series([1, 2, 2]) + >>> s.is_monotonic_increasing + True + + >>> s = bpd.Series([3, 2, 1]) + >>> s.is_monotonic_increasing + False + Returns: bool: Boolean. """ @@ -2981,6 +3044,19 @@ def is_monotonic_decreasing(self) -> bool: """ Return boolean if values in the object are monotonically decreasing. + **Examples:** + + >>> import bigframes.pandas as bpd + >>> bpd.options.display.progress_bar = None + + >>> s = bpd.Series([3, 2, 2, 1]) + >>> s.is_monotonic_decreasing + True + + >>> s = bpd.Series([1, 2, 3]) + >>> s.is_monotonic_decreasing + False + Returns: bool: Boolean. """