Write a Pandas program to get the items which are not common of two given series import pandas as pd import numpy as np sr1 = pd.Series([1, 2, 3, 4, 5]) sr2 = pd.Series([2, 4, 6, 8, 10])...


Write a Pandas program to get the items which are not common of two given series


import pandas as pd
import numpy as np
sr1 = pd.Series([1, 2, 3, 4, 5])
sr2 = pd.Series([2, 4, 6, 8, 10])
print("Original Series:")
print("sr1:")
print(sr1)
print("sr2:")
print(sr2)
print("\nItems of a given series not present in another given series:")
sr11 = #TO DO -- Complete the Code
sr22 = #TO DO -- Complete the Code
result = #TO DO -- Complete the Code
print(result)


Intended output


Original Series:
sr1:
0    1
1    2
2    3
3    4
4    5
dtype: int64
sr2:
0     2
1     4
2     6
3     8
4    10
dtype: int64


items of a given series not present in another given series:
0     1
2     3


4     5
5     6
6     8
7    10
dtype: int64



Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here