# imports the necessary libraries
import pandas as pd
import matplotlib.pyplot as plt
# loads the unemployment dataset`enter code here`
unemployment = pd.read_csv(r'c:\unemployment.csv')
# title
plt.title('U.S. unemployment rate', fontsize = 20)
# x and y axis labels`enter code here`
plt.xlabel('Year')
plt.ylabel('% of total labor force')
# plot
plt.plot(unemployment["Year"], unemployment["Value"])
# saves the image
plt.savefig("unemployment.png")
# shows the image
plt.show()
0 个答案:
没有答案