初识pandas

今天看了pandas官方文档,全英文的2259页,其中有一章节叫做10min to pandas,觉得挺好,所以打算记上一记。

import pandas as pd
import numpy as np

dates = pd.date_range('20180101',periods=6)
df = pd.DataFrame(np.random.rand(6,4), index=dates, columns=list('ABCD'))
print(df)

>>>

 


data = {
'Guy11':[98, 89, 90],
'vps9':[30, 55, 65],
'muk1':[88, 89, 90]
}
df2 = pd.DataFrame(data,index=['1 times','2times', '3times'])
df2

>>>

 

 

 

posted @ 2018-01-31 21:32  pyming  阅读(127)  评论(0编辑  收藏  举报