import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
movies = pd.read_csv('https://myshare.leuphana.de/?t=575bdba72855fc993cd6a6e842bcde29')
b = ('Independent', 'Disney', 'Fox', 'Warner Bros.', 'Summit')
c = (3,19,8,6,2,14,5,4,2,1,4,1)
a = {"Leadstudio":["The Weistein Company", "Independent", "Disney", "Fox",
"20th Century Fox", "Warner Bros.", "Summit", "Paramount","Lionsgate","New Line","Sony","CBS"],
"Occurrences":[3,19,8,6,2,14,5,4,2,1,4,1]}
y = pd.DataFrame(a)
print(y)
#b Top 5 Leadstudios
import matplotlib.pyplot as plt
plt.bar(b,c)
plt.xlabel("Movies")
plt.ylabel("Occurrences")
plt.show()
所以这就是我的工作方式,我认为问题出在plt.bar()中,所以请向我展示我在这里所缺少的。