Check whether elements in the series are equal or not

In this python pandas program, we will check whether elements in the series are equal or not.

Steps to solve the program
  1. Import pandas library as pd.
  2. Create two series using pd.Series().
  3. Check whether elements in the series are equal or not using ” == “.
  4. Print the output.
				
					import pandas as pd
df1 = pd.Series([1,6,9,5])
df2 = pd.Series([5,2,4,5])
print("Equals:")
print(df1 == df2)
				
			

Output :

				
					Equals:
0    False
1    False
2    False
3     True
dtype: bool
				
			

divide two series

check whether elements in the series are greater than other series

Leave a Comment