Pandas filter a list of items present in a column
Pandas filter a list of items present in a column Question: I have a dataframe like as below df = pd.DataFrame({‘text’: ["Hi how","I am fine","Ila say Hi"], ‘tokens’:[[‘Hi’,’how’],[‘I’,’am’,’fine’],[‘Ila’,’say’,’Hi’]], ‘labels’:[[‘A’,’B’],[‘C’,’B’,’A’],[‘D’,’B’,’A’]]}) I would like to do the below a) Filter the df using tokens AND labels column b) Filter based on the values Hi, Ila for tokens …