cudf.DataFrame.median#
- DataFrame.median(axis=None, skipna=True, level=None, numeric_only=None, **kwargs)[source]#
Return the median of the values for the requested axis.
- Parameters:
- axis{index (0), columns (1)}
Axis for the function to be applied on. For Series this parameter is unused and defaults to 0.
- skipnabool, default True
Exclude NA/null values when computing the result.
- numeric_onlybool, default False
If True, includes only float, int, boolean columns. If False, will raise error in-case there are non-numeric columns.
- Returns:
- scalar
Examples
>>> import cudf >>> ser = cudf.Series([10, 25, 3, 25, 24, 6]) >>> ser 0 10 1 25 2 3 3 25 4 24 5 6 dtype: int64 >>> ser.median() 17.0
Pandas Compatibility Note
pandas.DataFrame.median()
,pandas.Series.median()
Parameters currently not supported are level and numeric_only.