(1)导入csv数据
>>>d =pandas.read_table(r"c:\csv\test.csv",sep=",")
>>>d =pandas.read_csv(r"c:\csv\test.csv")
>>>d
0
2013.05.23 16:23
0
1.33477
1.33453
1
1
40.929085
1
2013.05.23 16:23
1
1.33475
1.33451
2
0
40.039943
2
2013.05.23 16:23
2
1.33473
1.33449
3
0
39.123624
3
2013.05.23 16:23
3
1.33472
1.33448
4
0
38.654882
...
(2) 访问数据
>>> d['time']
0
2013.05.23 16:23
1
2013.05.23 16:23
2
2013.05.23 16:23
...
>>>d['time'][0]
'2013.05.23 16:23'
(3) 查看数据
d.head(10)
d.tail()
(4)查看数据的index
d.index
d.values
(5)查看数据概况
d.describe()
感受:(1)python中的pandas感觉是r语言中的数据操作方法在python中的一种实现。
(2)python中每个modul,每个class,每个def都是留有写doc的地方的,写没写是另一回事,可以用“对象名称.__doc__”查看。这是一个字符串,所以内容只能是字符串允许的内容。如果字符不足以满足说明需求,可能会加上web链接,或者专门的说明函数。
你要查看的应该是
import scipy
print scipy.quiver.__doc__
或者
import scipy
print help(scipy.quiver)
你要查看的应该是
import scipy
print scipy.quiver.__doc__
或者
import scipy
print help(scipy.quiver)
http://blog.sina.com.cn/s/blog_a73687bc0101eenc.html
http://pandas.pydata.org/pandas-docs/stable/10min.html(非常值得看!!!)
10 Minutes to pandas
http://www.jb51.net/article/62982.htm