I have a dataframe
import pandas as pd
data={'ip.src':['x.x.x.x','y.y.y.y','z.z.z.z'],
'ip.dst':['a.a.a.a','b.b.b.b','c.c.c.c'],
'src_country':['china','US','china'],
'dst_country':['pakistan','china','india']
}
Data=pd.DataFrame(data)
I want to keep only that value in ip.src and ip.dst columns which has china ,like if china is in src_country then it should only keep the value in ip.src and if china is in dst_country then it should only keep the value in ip.dst.Is there any way to do it?