Reputation: 20610
You can slice the dataframe by a equality check
df[df['column'] == 'key']
How do I slice the dataframe via a check into a set?
df[df['column'] in set(['key', 'key2', key3'])]
Upvotes: 0
Views: 721
Reputation: 2104
df[df["column"].isin(["key1", "key2", "key3"])]
This will do it.
Upvotes: 2