pandas describe kurtosis skewness 1

pandas describe kurtosis skewness

# credit to Stack Overflow user in source link
# df: pandas dataframe

from scipy.stats import describe
describe(df, axis=0) # (min, max), mean, variance, skewness, kurtosis

Here is what the above code is Doing:
1. import the scipy.stats module
2. use the describe function from the scipy.stats module
3. pass in the dataframe and the axis (0 for columns, 1 for rows)
4. the describe function returns a tuple of (min, max), mean, variance, skewness, kurtosis

Similar Posts