Skip to content

Instantly share code, notes, and snippets.

@Bennykillua
Last active July 2, 2022 09:04
Show Gist options
  • Save Bennykillua/9bc1ee120694f5b285d84252576e5a23 to your computer and use it in GitHub Desktop.
Save Bennykillua/9bc1ee120694f5b285d84252576e5a23 to your computer and use it in GitHub Desktop.
Pandas Open Source
import pandas as pd
df = pd.DataFrame({"A":[1, 10, 100, 1000, 10000],
"B":[2, 20, 200, 2000, 20000],
"C":[3, 30, 300, 3000, 30000],
"D":[4, 40, 400, 4000, 40000]})
#return the mean absolute deviation of the values for the requested axis
df.mad(axis = 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment