<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.groupby(titles.year // 10 * 10).size().plot.bar()<jupyter_output><empty_output><jupyter_text>Use groupby() to plot the number of "Hamlet" films made each decade.<jupyter_code>t = titles[titles.title == "Hamlet"]
t.groupby(titles.year // 10 * 10).size().plot.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.n == 1) & (cast.year // 10 * 10 == 1950)].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>n = cast[(cast.n < 6) & (cast.year // 10 * 10 == 1950)].groupby(['n','type']).size().unstack()
n.plot.bar()<jupyter_output><empty_output><jupyter_text>Use groupby() to determine how many roles are listed for each of the "The Pink Panther" movies.<jupyter_code>n = cast[cast.title == "The Pink Panther"].groupby(['year']).size()
n<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[cast.name == "<NAME>"]<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14978601997146934, 'fraction_numerical': 0.02710413694721826, 'mean_word_length': 6.269430051813472, 'pattern_counts': {'":': 0, '<': 28, '<?xml version=': 0, '>': 27, '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': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '641535', 'license': 'MIT', 'n_tokens_mistral': 521, 'n_tokens_neox': 477, 'n_words': 134, 'path': 'Exercises-3.ipynb', 'repo_name': 'ElanaFelsi/learn-pandas', 'size': '1406'}