pandas.Series.mad

Series.mad(skipna=True, level=None)

Return mean absolute deviation of values NA/null values are excluded

skipna : boolean, default True
Exclude NA/null values
level : int, default None
If the axis is a MultiIndex (hierarchical), count along a particular level, collapsing into a smaller Series

mad : float (or Series if level specified)