Pandas Series Functions min(), max(), mean(), median() and mode()

Panda’s Series-

In the last post, I explained how to create a panda’s series. Further,  a pandas series has a lot of   you often need to analyze, visualize and clean data.  In this post, I will be explaining min(), max(), mean(), median(), and mode functions.

min() Function-

import pandas as pd
lst=[2, 4, 6, 8, 10, 10, 12, 14,16]
ser=pd.Series(lst)
res=ser.min()
print(res)

Output: 2

max() Function-

import pandas as pd
lst=[2, 4, 6, 8, 10, 10, 12, 14,16]
ser=pd.Series(lst)
res=ser.max()
print(res)

Output: 10

mean() Function-

import pandas as pd
lst=[2, 4, 6, 8, 10, 10, 12, 14,16]
ser=pd.Series(lst)
res=ser.mean()
print(res)

Output: 9.1111111

median() Function-

import pandas as pd
lst=[2, 4, 6, 8, 10, 10, 12, 14,16]
ser=pd.Series(lst)
res=ser.median()
print(res)

Output: 10

mode() Function-

import pandas as pd
lst=[2, 4, 6, 8, 10, 10, 12, 14,16]
ser=pd.Series(lst)
res=ser.mode()
print(res)

Output: 10

See the video

Leave a Comment

Your email address will not be published. Required fields are marked *

©Postnetwork-All rights reserved.