Exact match of string in pandas python

Viewed 10061

I have a column in data frame which ex df:

  A
0 Good to 1. Good communication EI : tathagata.kar@ae.com
1 SAP ECC Project System  EI: ram.vaddadi@ae.com
2 EI : ravikumar.swarna  Role:SSE  Minimum Skill  

I have a list of of strings

ls=['tathagata.kar@ae.com','a.kar@ae.com']

Now if i want to filter out

for i in range(len(ls)):
   df1=df[df['A'].str.contains(ls[i])
        if len(df1.columns!=0):
            print ls[i]

I get the output

tathagata.kar@ae.com 
a.kar@ae.com

But I need only tathagata.kar@ae.com

How Can It be achieved? As you can see I've tried str.contains But I need something for extact match

3 Answers
Related