DataFrame.mad
- DataFrame.mad(numeric_only: bool = True) Series
Return standard deviation for each numeric column
Returns
- pandas.Series
The value of the standard deviation for each numeric column
See Also
Examples
>>> from tests import OPENSEARCH_TEST_CLIENT
>>> df = oml.DataFrame(OPENSEARCH_TEST_CLIENT, '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