eland.DataFrame.std#

DataFrame.std(numeric_only: Optional[bool] = None) Series#

返回每个数值列的标准差

参数#

numeric_only: {True, False, None} 默认值为 None

要返回的哪个数据类型 - True: 将所有值返回为 float64,删除 NaN/NaT 值 - None: 尽可能将所有值返回为相同的数据类型,删除 NaN/NaT - False: 尽可能将所有值返回为相同的数据类型,保留 NaN/NaT

返回值#

pandas.Series

每个数值列的标准差值

另请参阅#

pandas.DataFrame.std

示例#

>>> df = ed.DataFrame('http://localhost:9200', 'flights', columns=["AvgTicketPrice", "Cancelled", "dayOfWeek", "timestamp", "DestCountry"])
>>> df.std()  
AvgTicketPrice    266.407061
Cancelled           0.334664
dayOfWeek           1.939513
dtype: float64
>>> df.std(numeric_only=True)
AvgTicketPrice    266.407061
Cancelled           0.334664
dayOfWeek           1.939513
dtype: float64
>>> df.std(numeric_only=False)  
AvgTicketPrice     266.407
Cancelled         0.334664
dayOfWeek          1.93951
timestamp              NaT
DestCountry            NaN
dtype: object