索引
import pandas as pd
ser=pd.Series(range(0,10,2))
print(ser)
0 0
1 2
2 4
3 6
4 8
dtype...: int64
通过索引值或索引标签获取数据
通过index查看索引值
print(ser.index)
RangeIndex(start=0, stop=5, step=1)
自定义索引值
ser.index...=['a','b','c','d','f']
print(ser)
a 0
b 2
c 4
d 6
f 8
dtype: int64
通过索引值和索引标签获取数据
print...6
c 7
b 8
a 9
dtype: int64
a 10
b 10
c 10
d 10
f 10
g 10
dtype: int64
利用pandas...查询数据
import pandas as pd
stu_dic={
'name':['a','b','c','d','e','f','g','h'],
'age':[18,15,45,56,89,78,45,12