eland.DataFrame.mad#

DataFrame.mad(numeric_only: bool = True) Series#

返回每个数值列的标准差

返回#

pandas.Series

每个数值列的标准差的值

另请参阅#

pandas.DataFrame.std

示例#

>>> df = ed.DataFrame('http://localhost:9200', 'flights', columns=["AvgTicketPrice", "Cancelled", "dayOfWeek", "timestamp", "DestCountry"])
>>> df.mad() 
AvgTicketPrice    213.35497
dayOfWeek           2.00000
dtype: float64
>>> df.mad(numeric_only=True) 
AvgTicketPrice    213.473011
dayOfWeek           2.000000
dtype: float64
>>> df.mad(numeric_only=False) 
AvgTicketPrice    213.484
Cancelled             NaN
dayOfWeek               2
timestamp             NaT
DestCountry           NaN
dtype: object