Reputation: 79
i'm curious if it's possible to filter a pandas DataFrame by column and a condition. Or do i have to do it with two steps.
So my basic idea is to do:
df['cluster' & (df['Type'] == 't')]
Or is there no overhead achieving this by two steps like:
tmp = df[df['Type'] == 't']
tmp = tmp[df['Type']]
Upvotes: 2
Views: 284