Q:

Write a Pandas program to check the equality of two given series

0

Write a Pandas program to check the equality of two given series.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

import pandas as pd
nums1 = pd.Series([1, 8, 7, 5, 6, 5, 3, 4, 7, 1])
nums2 = pd.Series([1, 8, 7, 5, 6, 5, 3, 4, 7, 1])
print("Original Series:")
print(nums1)
print(nums2)
print("Check 2 series are equal or not?")
print(nums1 == nums2)

Sample Output:

Original Series:
0    1
1    8
2    7
3    5
4    6
5    5
6    3
7    4
8    7
9    1
dtype: int64
0    1
1    8
2    7
3    5
4    6
5    5
6    3
7    4
8    7
9    1
dtype: int64
Check 2 series are equal or not?
0    True
1    True
2    True
3    True
4    True
5    True
6    True
7    True
8    True
9    True
dtype: bool

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now