
Spencer H. answered 07/03/21
I can help you build a foundation in python and data science
The first step will be to create a dictionary that has the languages as keys and a list of how many movies were in that language for each year.
'''
years = list(range(1950, 2019))
nMovies = {'Italian': [], 'German': [], 'French': [],
'Spanish': [], 'Japanese': []}
for y in years:
temp = df.loc[df['year'] == y]
for l in list(nMovies.keys()):
nMovies[l].append(len(temp.loc[temp['language'] == l]))
'''
then you can use matplotlib's plot function and set a list of the dictionary's keys AKA the languages as the legend.
'''
from matplotlib import pyplot as plt
for k in list(nMovies.keys()):
plt.plot(nMovies[k])
plt.legend(list(nMovies.keys()))
'''