如果以非IPyhon启动python,则pandas自带的绘图函数plot失效,无法成功绘图,解决办法如下例:
import tushare as ts import pandas as pd import matplotlib.pyplot as plt #data_raw = ts.get_hist_data(‘002316‘) #print data_raw #data_raw_rehabilitation = ts.get_h_data(‘002316‘, start=‘2010-01-01‘) #data_raw_rehabilitation.to_csv(‘002316.csv‘) data_raw_by_tick = ts.get_tick_data(‘002316‘, date = ‘2015-12-28‘) data_raw_by_tick.to_csv(‘tick.csv‘) data_raw_by_tick[‘amount‘].plot() #plt.figure() plt.show()
原文地址:http://reboot001.blog.51cto.com/10869138/1729358