pandas.core.groupby.SeriesGroupBy.skew #
- 系列分组依据。skew ( axis = _NoDefault.no_default , Skipna = True , numeric_only = False , ** kwargs ) [来源] #
返回组内的无偏斜。
通过 N-1 归一化。
- 参数:
- 轴{0 或 'index', 1 或 'columns', None}, 默认 0
要应用的功能的轴。该参数仅用于与DataFrame兼容,未使用。
自版本 2.1.0 起已弃用:对于 axis=1,改为对基础对象进行操作。否则,axis 关键字不是必需的。
- Skipna布尔值,默认 True
计算结果时排除 NA/null 值。
- numeric_only布尔值,默认 False
仅包含 float、int、boolean 列。未针对系列实现。
- **夸格
要传递给函数的其他关键字参数。
- 返回:
- 系列
也可以看看
Series.skew
返回请求轴上的无偏斜。
例子
>>> ser = pd.Series([390., 350., 357., np.nan, 22., 20., 30.], ... index=['Falcon', 'Falcon', 'Falcon', 'Falcon', ... 'Parrot', 'Parrot', 'Parrot'], ... name="Max Speed") >>> ser Falcon 390.0 Falcon 350.0 Falcon 357.0 Falcon NaN Parrot 22.0 Parrot 20.0 Parrot 30.0 Name: Max Speed, dtype: float64 >>> ser.groupby(level=0).skew() Falcon 1.525174 Parrot 1.457863 Name: Max Speed, dtype: float64 >>> ser.groupby(level=0).skew(skipna=False) Falcon NaN Parrot 1.457863 Name: Max Speed, dtype: float64