I looked in the documentation for version 2.1.4 and didn't find anything about Mean Absolute Deviation, which in previous versions was mad(). Can anyone tell me which method in the current version works like mad()?
mad() method has been deprecated, however, you can still calculate the MAD manually using simple formula with the mean() method and absolute differences.
Here's the code.
import pandas as pd
s = pd.Series([2, 3, 5, 7, 11])
# Compute MAD manually
mad = (s - s.mean()).abs().mean()
print(mad)
I hope this will help you a little.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With