0

If I have a Pandas DataFrame like this :

id     fruits
01     Apple, Apricot
02     Apple, Banana, Clementine, Pear
03     Orange, Pineapple, Pear
04    

How can i filter rows which contains Apricot, Orange and Pineapple and get following dataframe? Thanks.

id     fruits
01     Apple, Apricot
03     Orange, Pineapple, Pear
ah bon
  • 9,293
  • 12
  • 65
  • 148

0 Answers0