Python Practice › Pandas Programs › Program 18
Mean of a Series
Write a pandas program to find the mean of a Series.
Input
[5, 4, 8, 6]
Output
5.75
Approach
mean().
Solution
import pandas as pdprint(pd.Series([5, 4, 8, 6]).mean())Output
5.75
Learn the concept
New to this topic? Read the lesson, then come back.