In this python pandas program, we will calculate the maximum value from a series using pandas.
Steps to solve the program
- Import pandas library as pd.
- Create a series using pd.Series().
- Find the maximum value of the series using df.max().
- Print the output.
import pandas as pd
df = pd.Series([54,38,67,87])
print(df)
print("Maximum value: ",df.max())
Output :
0 54
1 38
2 67
3 87
dtype: int64
Maximum value: 87