我有一个带有邮政编码的CSV文件,每个邮政编码对应一个数字。我想用柱状图来绘制它,但是现在只显示轴,没有实际的信息
import pandas as pd
import matplotlib.pyplot as plt
installedbase = 'zipcode.csv'
df = pd.read_csv(installedbase)
df.plot(x = 'zip_code_installed', y = 'installed_NP', kind = 'hist', rwidth = .5, bins = 1000 )
plt.xlabel('zip code')
plt.ylabel('NP sum')
plt.axis([9000,9650,0,6400])
plt.show()
我用熊猫和matplotlib来绘图。”“x”和“y”在我的CSV文件中都设置为不同的列
目前没有回答
相关问题 更多 >
编程相关推荐