To calculate the mean,median,mode of the sample data in python.
It add together all of the numbers in a data set and then divide the sum by the total count of numbers.
To calculate the mean value using df.mean() python inbuilt function.
It arranging the data from smallest to largest.
After arranging it takes the middle data in a data set.
Find the median by averaging the two middle data.
To calculate the median value using df.median() python inbuilt function.
Its returns the frequently used data one or more time in a data set.
To calculate the mode value using df.mode() python inbuilt function.
#import pandas library
import pandas as pd
#load the data from CSV file
#creating the Data Frame
print(“Actual data from the CSV file:”)
#Calculate the mean
#Calculate the median
#calculate the mode