Created
September 25, 2016 02:49
-
-
Save alexpetralia/ca013236629008dce1b5863aa7ccda8b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
facet_labels = ['economist_name', 'institution', 'sex'] | |
facets = df.groupby(facet_labels).first().reset_index()[facet_labels] | |
# Summary statistics | |
len(df.groupby('topic_name')) # 132 topics | |
len(df.groupby(['topic_name', 'survey_question'])) # 195 survey questions | |
len(facets['economist_name'].unique()) # 51 economists | |
facets.groupby('sex').size() # 11 female, 40 male | |
facets.groupby('institution').size().sort_values(ascending=False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment