<jupyter_start><jupyter_text>Using groupby(), plot the number of films that have been released each decade in the history of cinema.<jupyter_code>t = titles
t.groupby(t.year //10 *10). size().plot(kind ='bar')<jupyter_output><empty_output><jupyter_text>Use groupby() to plot the number of "Hamlet" films made each decade.<jupyter_code>t = titles
t = t[t.title == 'Hamlet']
t.groupby(t.year //10 *10). size().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>c = cast
c = c[c.year // 10 == 195]
c = c[c.n == 1]
c.groupby(['year', 'type']).size()<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>c = cast
c = c[c.year //10 * 10 == 1950]
c = c[c.n < 6]
c.groupby(['n', 'type']).size()<jupyter_output><empty_output><jupyter_text>Use groupby() to determine how many roles are listed for each of the Pink Panther movies.<jupyter_code>c = cast
c = c[c.title == 'The Pink Panther']
c = c.sort_values(by=('n')).groupby(['year'])[['n']].max()
c<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>c = cast
c = c[c.name == '<NAME>']
g = c.groupby(['year', 'title']).size()
g[g > 1]<jupyter_output><empty_output><jupyter_text>List each of the characters that <NAME> has portrayed at least twice.<jupyter_code>c = cast
c = c[c.name == '<NAME>']
g = c.groupby(['character']).size()
g[g > 1].sort_values()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16391509433962265, 'fraction_numerical': 0.021816037735849055, 'mean_word_length': 5.760956175298805, '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': '105231', 'license': 'MIT', 'n_tokens_mistral': 662, 'n_tokens_neox': 626, 'n_words': 180, 'path': 'Exercises-3.ipynb', 'repo_name': 'jlvengo/pandas-deep-dive', 'size': '1704'}