标签:http read panda state amp tle users try ted
处理处理及画图的基本步骤:
from matplotlib import pyplot as plt import pandas as pd data2=pd.read_csv(‘/Users/ligaijiang/Pyexample/Plt/countries.csv‘) China_filter=data2.country==‘China‘ China_data=data2[China_filter] US_filter=data2.country==‘United States‘ US_data=data2[US_filter] JP_filter=data2.country==‘Japan‘ JP_data=data2[JP_filter] #print(China_data) #print(US_data) #print(JP_data) plt.plot(China_data.year,China_data.population) plt.plot(US_data.year,US_data.population) plt.plot(JP_data.year,JP_data.population) plt.xlabel(‘Year‘) plt.ylabel(‘Population‘) plt.title(‘Country Population‘) plt.legend([‘China‘,‘Us‘,‘Jp‘]) plt.show()
标签:http read panda state amp tle users try ted
原文地址:https://www.cnblogs.com/jpr-ok/p/12449847.html