bigframes.pandas.DataFrame.median#

DataFrame.median(*, numeric_only: bool = False, exact: bool = True) Series[source]#

Return the median of the values over colunms.

Examples:

>>> import bigframes.pandas as bpd
>>> df = bpd.DataFrame({"A": [1, 3], "B": [2, 4]})
>>> df
    A       B
0   1       2
1   3       4

[2 rows x 2 columns]

Finding the median value of each column.

>>> df.median()
A    2.0
B    3.0
dtype: Float64
Parameters:
  • numeric_only (bool. default False) – Default False. Include only float, int, boolean columns.

  • exact (bool. default True) – Default True. Get the exact median instead of an approximate one.

Returns:

Series with the median of values.

Return type:

bigframes.pandas.Series