Calculate the maximum value from a series using Pandas

In this python pandas program, we will calculate the maximum value from a series using pandas.

Steps to solve the program
  1. Import pandas library as pd.
  2. Create a series using pd.Series().
  3. Find the maximum value of the series using df.max().
  4. 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
				
			

get the items of a series not present in another series

calculate the minimum value from a series

Leave a Comment