Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 84 additions & 3 deletions third_party/bigframes_vendored/pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -2597,7 +2597,7 @@ def any(self, *, axis=0, bool_only: bool = False):
<BLANKLINE>
[2 rows x 2 columns]

Checking if each column contains at least one True element(the default behavior without an explicit axis parameter).
Checking if each column contains at least one True element (the default behavior without an explicit axis parameter).

>>> df.any()
A True
Expand Down Expand Up @@ -2644,7 +2644,7 @@ def all(self, axis=0, *, bool_only: bool = False):
<BLANKLINE>
[2 rows x 2 columns]

Checking if all values in each column are True(the default behavior without an explicit axis parameter).
Checking if all values in each column are True (the default behavior without an explicit axis parameter).

>>> df.all()
A True
Expand Down Expand Up @@ -2688,7 +2688,7 @@ def prod(self, axis=0, *, numeric_only: bool = False):
<BLANKLINE>
[3 rows x 2 columns]

Calculating the product of each column(the default behavior without an explicit axis parameter).
Calculating the product of each column (the default behavior without an explicit axis parameter).

>>> df.prod()
A 6.0
Expand Down Expand Up @@ -2721,6 +2721,33 @@ def min(self, axis=0, *, numeric_only: bool = False):
If you want the *index* of the minimum, use ``idxmin``. This is the
equivalent of the ``numpy.ndarray`` method ``argmin``.

**Examples:**

>>> import bigframes.pandas as bpd
>>> bpd.options.display.progress_bar = None

>>> df = bpd.DataFrame({"A": [1, 3], "B": [2, 4]})
>>> df
A B
0 1 2
1 3 4
<BLANKLINE>
[2 rows x 2 columns]

Finding the minimum value in each column (the default behavior without an explicit axis parameter).

>>> df.min()
A 1.0
B 2.0
dtype: Float64

Finding the minimum value in each row.

>>> df.min(axis=1)
0 1.0
1 3.0
dtype: Float64

Args:
axis ({index (0), columns (1)}):
Axis for the function to be applied on.
Expand All @@ -2739,6 +2766,33 @@ def max(self, axis=0, *, numeric_only: bool = False):
If you want the *index* of the maximum, use ``idxmax``. This is
the equivalent of the ``numpy.ndarray`` method ``argmax``.

**Examples:**

>>> import bigframes.pandas as bpd
>>> bpd.options.display.progress_bar = None

>>> df = bpd.DataFrame({"A": [1, 3], "B": [2, 4]})
>>> df
A B
0 1 2
1 3 4
<BLANKLINE>
[2 rows x 2 columns]

Finding the maximum value in each column (the default behavior without an explicit axis parameter).

>>> df.max()
A 3.0
B 4.0
dtype: Float64

Finding the maximum value in each row.

>>> df.max(axis=1)
0 2.0
1 4.0
dtype: Float64

Args:
axis ({index (0), columns (1)}):
Axis for the function to be applied on.
Expand All @@ -2756,6 +2810,33 @@ def sum(self, axis=0, *, numeric_only: bool = False):

This is equivalent to the method ``numpy.sum``.

**Examples:**

>>> import bigframes.pandas as bpd
>>> bpd.options.display.progress_bar = None

>>> df = bpd.DataFrame({"A": [1, 3], "B": [2, 4]})
>>> df
A B
0 1 2
1 3 4
<BLANKLINE>
[2 rows x 2 columns]

Calculating the sum of each column (the default behavior without an explicit axis parameter).

>>> df.sum()
A 4.0
B 6.0
dtype: Float64

Calculating the sum of each row.

>>> df.sum(axis=1)
0 3.0
1 7.0
dtype: Float64

Args:
axis ({index (0), columns (1)}):
Axis for the function to be applied on.
Expand Down