@@ -2711,6 +2711,31 @@ def argmax(self):
2711
2711
2712
2712
If the minimum is achieved in multiple locations, the first row position is returned.
2713
2713
2714
+ **Examples:**
2715
+
2716
+ >>> import bigframes.pandas as bpd
2717
+ >>> bpd.options.display.progress_bar = None
2718
+
2719
+ Consider dataset containing cereal calories.
2720
+
2721
+ >>> s = bpd.Series({'Corn Flakes': 100.0, 'Almond Delight': 110.0,
2722
+ ... 'Cinnamon Toast Crunch': 120.0, 'Cocoa Puff': 110.0})
2723
+ >>> s
2724
+ Corn Flakes 100.0
2725
+ Almond Delight 110.0
2726
+ Cinnamon Toast Crunch 120.0
2727
+ Cocoa Puff 110.0
2728
+ dtype: Float64
2729
+
2730
+ >>> s.argmax()
2731
+ 2
2732
+
2733
+ >>> s.argmin()
2734
+ 0
2735
+
2736
+ The maximum cereal calories is the third element and the minimum cereal
2737
+ calories is the first element, since series is zero-indexed.
2738
+
2714
2739
Returns:
2715
2740
Series: Row position of the maximum value.
2716
2741
"""
@@ -2722,6 +2747,31 @@ def argmin(self):
2722
2747
2723
2748
If the maximum is achieved in multiple locations, the first row position is returned.
2724
2749
2750
+ **Examples:**
2751
+
2752
+ >>> import bigframes.pandas as bpd
2753
+ >>> bpd.options.display.progress_bar = None
2754
+
2755
+ Consider dataset containing cereal calories.
2756
+
2757
+ >>> s = bpd.Series({'Corn Flakes': 100.0, 'Almond Delight': 110.0,
2758
+ ... 'Cinnamon Toast Crunch': 120.0, 'Cocoa Puff': 110.0})
2759
+ >>> s
2760
+ Corn Flakes 100.0
2761
+ Almond Delight 110.0
2762
+ Cinnamon Toast Crunch 120.0
2763
+ Cocoa Puff 110.0
2764
+ dtype: Float64
2765
+
2766
+ >>> s.argmax()
2767
+ 2
2768
+
2769
+ >>> s.argmin()
2770
+ 0
2771
+
2772
+ The maximum cereal calories is the third element and the minimum cereal
2773
+ calories is the first element, since series is zero-indexed.
2774
+
2725
2775
Returns:
2726
2776
Series: Row position of the minimum value.
2727
2777
"""
@@ -2971,6 +3021,19 @@ def is_monotonic_increasing(self) -> bool:
2971
3021
"""
2972
3022
Return boolean if values in the object are monotonically increasing.
2973
3023
3024
+ **Examples:**
3025
+
3026
+ >>> import bigframes.pandas as bpd
3027
+ >>> bpd.options.display.progress_bar = None
3028
+
3029
+ >>> s = bpd.Series([1, 2, 2])
3030
+ >>> s.is_monotonic_increasing
3031
+ True
3032
+
3033
+ >>> s = bpd.Series([3, 2, 1])
3034
+ >>> s.is_monotonic_increasing
3035
+ False
3036
+
2974
3037
Returns:
2975
3038
bool: Boolean.
2976
3039
"""
@@ -2981,6 +3044,19 @@ def is_monotonic_decreasing(self) -> bool:
2981
3044
"""
2982
3045
Return boolean if values in the object are monotonically decreasing.
2983
3046
3047
+ **Examples:**
3048
+
3049
+ >>> import bigframes.pandas as bpd
3050
+ >>> bpd.options.display.progress_bar = None
3051
+
3052
+ >>> s = bpd.Series([3, 2, 2, 1])
3053
+ >>> s.is_monotonic_decreasing
3054
+ True
3055
+
3056
+ >>> s = bpd.Series([1, 2, 3])
3057
+ >>> s.is_monotonic_decreasing
3058
+ False
3059
+
2984
3060
Returns:
2985
3061
bool: Boolean.
2986
3062
"""
0 commit comments