Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
mask = (df.filter(regex='thin', axis=1).sum(axis=1).astype(bool) &
df.filter(regex='regular', axis=1).sum(axis=1).astype(bool) &
df.filter(regex='thai', axis=1).sum(axis=1).astype(bool))
df_selected = df[mask]
df_selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment