pandas.api.typing.SeriesGroupBy.median
pandas 3.1.1 · GroupBy · method
Find the middle of the sorted values, averaging the central pair when there are two.
Call syntax
pd.api.typing.SeriesGroupBy.median(numeric_only=False, skipna=True)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
numeric_only |
Optional Positional or keyword Default False |
bool Restrict the calculation to columns pandas considers numeric where applicable. |
skipna |
Optional Positional or keyword Default True |
bool Choose whether to exclude missing values during the calculation. |
Returns
Series or DataFrame