Program to find the mean of the data of a given series

In this python pandas program,we will find the mean of the data of a given series using pandas library.

Steps to solve the program
  1. Import pandas library as pd.
  2. Create a series using pd.Series().
  3. Find the mean of the given series using df.mean().
  4. Print the output.
				
					import pandas as pd
df = pf.Series([5,4,8,6])
print(df)
print("Mean of the given series: ",df.mean())
				
			

Output :

				
					0    5
1    4
2    8
3    6
dtype: int64
Mean of the given series:  5.75
				
			

change the order of the index of a given series

find the standard deviation of the  given Series

Leave a Comment