<jupyter_start><jupyter_text>Using groupby(), plot the number of films that have been released each decade in the history of cinema.<jupyter_code>titles['decade'] = titles.year // 10 * 10
titles.groupby('decade').size().plot(kind='bar')<jupyter_output><empty_output><jupyter_text>Use groupby() to plot the number of "Hamlet" films made each decade.<jupyter_code>titles[titles.title=='Hamlet'].groupby('decade').size().sort_index().plot(kind='bar')<jupyter_output><empty_output><jupyter_text>How many leading (n=1) roles were available to actors, and how many to actresses, in each year of the 1950s?<jupyter_code>cast[(cast.year//10==195)&(cast.n==1)].groupby(['year','type']).type.value_counts()<jupyter_output><empty_output><jupyter_text>In the 1950s decade taken as a whole, how many total roles were available to actors, and how many to actresses, for each "n" number 1 through 5?<jupyter_code>cast[(cast.year//10==195)&(cast.n<=5)].groupby(['n','type']).type.value_counts()<jupyter_output><empty_output><jupyter_text>Use groupby() to determine how many roles are listed for each of the Pink Panther movies.<jupyter_code>cast[cast.title.str.contains('Pink Panther')].groupby('year').size()<jupyter_output><empty_output><jupyter_text>List, in order by year, each of the films in which <NAME> has played more than 1 role.<jupyter_code>cast[cast.name=='<NAME>'].groupby(['title','year']).size()>1<jupyter_output><empty_output><jupyter_text>List each of the characters that <NAME> has portrayed at least twice.<jupyter_code>cast[cast.name=='<NAME>'].groupby('character').size()>2<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15724052206339342, 'fraction_numerical': 0.018645121193287758, 'mean_word_length': 8.640718562874252, 'pattern_counts': {'":': 0, '<': 34, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '577091', 'license': 'MIT', 'n_tokens_mistral': 573, 'n_tokens_neox': 541, 'n_words': 123, 'path': 'Tutorial/Exercises-3.ipynb', 'repo_name': 'RobbieNesmith/PandasTutorial', 'size': '1617'}