pandas的Series

输入:
import pandas as pd
s = pd.Series([1.1,2,3,4,5],index = ['a','b','c','d','e'])
print(s[['a']])


输出:
a    1.1
dtype: float64

输入:
import pandas as pd
s = pd.Series([1.1,2,3,4,5],index = ['a','b','c','d','e'])
print(s['a'])

输出:
1.1
import pandas as pd
data = {'name': ["tom", "alix", "amoxz"], 'age': ["11","12","122"]}
data_xxx = [{'name':'tom','age':11}, {'name':'alis','age':11123}]
sss = pd.DataFrame(data_xxx, index=[101,102,])
print(sss)



posted @ 2018-06-29 14:05  Clownszz  阅读(183)  评论(0编辑  收藏  举报