输入:
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)