AntiDestiny
已经解决了
>>
完整版
已经解决了...想了解怎么做比较方便的童鞋可以参考以下:
元组其实用matplotlib什么的也是可以画出来,但是元组操作起来不方便,为了提高效率..于是我找到了这个module,那就是
pandas!!
这个模块十二分强大,而且处理金融数据特别得心应手。如果你是用的MySQL数据库的话,你只需要
# use pymysql to connect to mysql
from pymysql import connect
from pandas.io.sql import read_frame
conn = connect(host='localhost', port=3306, user='此处是你的用户名', passwd="此处是你的密码", db='此处是你的database')
query= 'select * from %s' %"此处是你的表名"
data = read_frame(query,conn)
#print your data
print data
#close connection
conn.close()
这样你直接抓到的就是dataframe类的数据(pandas的最常用的数据类型),而且pandas跟numpy以及matplotlib都有非常好的支持和互动@@32!!