就是弄不出来,不知道哪里的问题,
import pandas as pd
aDict={"Grade":[1,2,3,4,5,6],
"Year":[2010,2011,2012,2013,2014,2015],
"Name":["张大","张二","张三","张四","张五","张六"]}
aList=["s1","t2","y3","i4","o5","p6"]
bList=["Name","Address","Year","Grade","Phone"]
aDf=pd.DataFrame(aDict,
index=aList,
columns=bList)
print ("使用字典和列表创建了DataFrame 对象。")
print ("其值是: \n",aDf)
print ("其类型是: \n",type(aDf))
print ("其维数是: \n",aDf.ndim)
print ("其尺寸是: \n",aDf.shape)
print ("其元素个数是: \n",aDf.size)