Categories
data science FAQ's

How will you verify if the items present in list A are present in series B?

We will use the isin() function. For this, we create two series s1 and s2 –s1 = pd.Series([1, 2, 3, 4, 5])

s2 = pd.Series([4, 5, 6, 7, 8])

s1[s1.isin(s2)]

Leave a Reply

Your email address will not be published. Required fields are marked *