Skip to content

Instantly share code, notes, and snippets.

@erraticgenerator
Created October 31, 2020 23:57
Show Gist options
  • Save erraticgenerator/7bfab1e8f1d8502a31f424b8750bdac1 to your computer and use it in GitHub Desktop.
Save erraticgenerator/7bfab1e8f1d8502a31f424b8750bdac1 to your computer and use it in GitHub Desktop.
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