pyspark.pandas.Series.mad

Series.mad() → float[source]

Return the mean absolute deviation of values.

Examples

>>> s = ps.Series([1, 2, 3, 4])
>>> s
0    1
1    2
2    3
3    4
dtype: int64
>>> s.mad()
1.0