pandas filter rows that are in a list

36

value_list = ["apple"]
boolean_series = df.fruit.isin(value_list)
filtered_df = df[boolean_series]

Comments

Submit
0 Comments