我想用matplotlib将开盘价显示为x轴,安全名称显示为y轴,因为我的数据存储在pandas dataframe图形结果中没什么。谢谢你的帮助。在
import requests.packages.urllib3
requests.packages.urllib3.disable_warnings()
dfs = pd.read_excel('Movement of BSE RIK.xlsx',header=0,dtype={'Open Price (Rs.)':np.float64,'Close Price (Rs.)':np.float64}, sheetname=None)
xl=pd.ExcelFile('Movement of BSE RIK.xlsx',header=0,dtype={'Open Price (Rs.)':np.float64})
p=xl.sheet_names
matplotlib.style.use('ggplot')
print(dfs['D-0']['Open Price (Rs.)'])
plt.plot(y=dfs['D-0']['Open Price (Rs.)'], x=dfs['D-0']['Security Name'], kind='bar')
plt.show()
这里'D-0'是我的表名包含股票数据这里是我的数据链接 https://drive.google.com/open?id=0B_RSbeIckLLeR0ZJelQtY0tUbTQ
我想您需要添加
thousands=','
参数来删除,
中的float
s:然后^{} :
^{pr2}$但有很多数据:
相关问题 更多 >
编程相关推荐