Research breakthrough possible @S-Logix

Office Address

  • 2nd Floor, #7a, High School Road, Secretariat Colony Ambattur, Chennai-600053 (Landmark: SRM School) Tamil Nadu, India
  • +91- 81240 01111

Social List

How to calculate Skewness and Kurtosis for a data set in python?


To calculate the skewness and kurtosis for a sample data set using python.



It represents the shape of the distribution.

Skewness can be quantified to define the extent to which a distribution differs from a normal distribution.

For calculating skewness by using df.skew() python inbuilt function.


Kurtosis is the measure of thickness or heaviness of the given distribution.

Its actually represents the height of the distribution.

The distribution with kurtosis equal to3 is known as mesokurtic. A random variable which follows normal distribution has kurtosis 3.

If the kurtosis is less than three, the distribution is called as platykurtic. Here,the distribution has shorter and thinner tails than normal distribution.

If the kurtosis is greater than three, the distribution is called as leptykurtic. Here, the distribution has longer and fatter tails than normal distribution.

For calculating kurtosis by using df.kurtosis() python inbuilt function.

Sample Code

#import pandas library
import pandas as pd
#Read the data set
#creating data frame
print(“The value of Skewness is:”)
#calculating the skewness
print(“The value of kurtosis is:”)
#calculating the kurtosis

Calculate Skewness and Kurtosis for a data set in python
import pandas library