@@ -2597,7 +2597,7 @@ def any(self, *, axis=0, bool_only: bool = False):
2597
2597
<BLANKLINE>
2598
2598
[2 rows x 2 columns]
2599
2599
2600
- Checking if each column contains at least one True element(the default behavior without an explicit axis parameter).
2600
+ Checking if each column contains at least one True element (the default behavior without an explicit axis parameter).
2601
2601
2602
2602
>>> df.any()
2603
2603
A True
@@ -2644,7 +2644,7 @@ def all(self, axis=0, *, bool_only: bool = False):
2644
2644
<BLANKLINE>
2645
2645
[2 rows x 2 columns]
2646
2646
2647
- Checking if all values in each column are True(the default behavior without an explicit axis parameter).
2647
+ Checking if all values in each column are True (the default behavior without an explicit axis parameter).
2648
2648
2649
2649
>>> df.all()
2650
2650
A True
@@ -2688,7 +2688,7 @@ def prod(self, axis=0, *, numeric_only: bool = False):
2688
2688
<BLANKLINE>
2689
2689
[3 rows x 2 columns]
2690
2690
2691
- Calculating the product of each column(the default behavior without an explicit axis parameter).
2691
+ Calculating the product of each column (the default behavior without an explicit axis parameter).
2692
2692
2693
2693
>>> df.prod()
2694
2694
A 6.0
@@ -2721,6 +2721,33 @@ def min(self, axis=0, *, numeric_only: bool = False):
2721
2721
If you want the *index* of the minimum, use ``idxmin``. This is the
2722
2722
equivalent of the ``numpy.ndarray`` method ``argmin``.
2723
2723
2724
+ **Examples:**
2725
+
2726
+ >>> import bigframes.pandas as bpd
2727
+ >>> bpd.options.display.progress_bar = None
2728
+
2729
+ >>> df = bpd.DataFrame({"A": [1, 3], "B": [2, 4]})
2730
+ >>> df
2731
+ A B
2732
+ 0 1 2
2733
+ 1 3 4
2734
+ <BLANKLINE>
2735
+ [2 rows x 2 columns]
2736
+
2737
+ Finding the minimum value in each column (the default behavior without an explicit axis parameter).
2738
+
2739
+ >>> df.min()
2740
+ A 1.0
2741
+ B 2.0
2742
+ dtype: Float64
2743
+
2744
+ Finding the minimum value in each row.
2745
+
2746
+ >>> df.min(axis=1)
2747
+ 0 1.0
2748
+ 1 3.0
2749
+ dtype: Float64
2750
+
2724
2751
Args:
2725
2752
axis ({index (0), columns (1)}):
2726
2753
Axis for the function to be applied on.
@@ -2739,6 +2766,33 @@ def max(self, axis=0, *, numeric_only: bool = False):
2739
2766
If you want the *index* of the maximum, use ``idxmax``. This is
2740
2767
the equivalent of the ``numpy.ndarray`` method ``argmax``.
2741
2768
2769
+ **Examples:**
2770
+
2771
+ >>> import bigframes.pandas as bpd
2772
+ >>> bpd.options.display.progress_bar = None
2773
+
2774
+ >>> df = bpd.DataFrame({"A": [1, 3], "B": [2, 4]})
2775
+ >>> df
2776
+ A B
2777
+ 0 1 2
2778
+ 1 3 4
2779
+ <BLANKLINE>
2780
+ [2 rows x 2 columns]
2781
+
2782
+ Finding the maximum value in each column (the default behavior without an explicit axis parameter).
2783
+
2784
+ >>> df.max()
2785
+ A 3.0
2786
+ B 4.0
2787
+ dtype: Float64
2788
+
2789
+ Finding the maximum value in each row.
2790
+
2791
+ >>> df.max(axis=1)
2792
+ 0 2.0
2793
+ 1 4.0
2794
+ dtype: Float64
2795
+
2742
2796
Args:
2743
2797
axis ({index (0), columns (1)}):
2744
2798
Axis for the function to be applied on.
@@ -2756,6 +2810,33 @@ def sum(self, axis=0, *, numeric_only: bool = False):
2756
2810
2757
2811
This is equivalent to the method ``numpy.sum``.
2758
2812
2813
+ **Examples:**
2814
+
2815
+ >>> import bigframes.pandas as bpd
2816
+ >>> bpd.options.display.progress_bar = None
2817
+
2818
+ >>> df = bpd.DataFrame({"A": [1, 3], "B": [2, 4]})
2819
+ >>> df
2820
+ A B
2821
+ 0 1 2
2822
+ 1 3 4
2823
+ <BLANKLINE>
2824
+ [2 rows x 2 columns]
2825
+
2826
+ Calculating the sum of each column (the default behavior without an explicit axis parameter).
2827
+
2828
+ >>> df.sum()
2829
+ A 4.0
2830
+ B 6.0
2831
+ dtype: Float64
2832
+
2833
+ Calculating the sum of each row.
2834
+
2835
+ >>> df.sum(axis=1)
2836
+ 0 3.0
2837
+ 1 7.0
2838
+ dtype: Float64
2839
+
2759
2840
Args:
2760
2841
axis ({index (0), columns (1)}):
2761
2842
Axis for the function to be applied on.
0 commit comments