Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
print('Number of fonts in each variant:')
print(df[df.filter(regex=r'^variants_', axis=1).columns].eq(1).sum().sort_values(ascending=False))
print('\nNumber of fonts in each subset:')
print(df[df.filter(regex=r'^subsets_', axis=1).columns].eq(1).sum().sort_values(ascending=False))
print('\nNumber of fonts in each category:')
print(df[df.filter(regex=r'^category_', axis=1).columns].eq(1).sum().sort_values(ascending=False))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment