Answers for "line chart matplotlib read data using pandas"

1

python line chart

import matplotlib.pyplot as plt
   
Year = [1920,1930,1940,1950,1960,1970,1980,1990,2000,2010]
Unemployment_Rate = [9.8,12,8,7.2,6.9,7,6.5,6.2,5.5,6.3]
  
plt.plot(Year, Unemployment_Rate)
plt.title('Unemployment Rate Vs Year')
plt.xlabel('Year')
plt.ylabel('Unemployment Rate')
plt.show()
Posted by: Guest on November-20-2020
0

DataFrame.plot.line() method: | dataframe line plot

# DataFrame.plot.line() method
#eg 
df['col'].plot.line()
plt.xlabel("X axis label")
plt.ylabel("Y axis label")
plt.show()
Posted by: Guest on August-12-2021

Code answers related to "line chart matplotlib read data using pandas"

Python Answers by Framework

Browse Popular Code Answers by Language