series对象的使用
上一节
下一节

例1:默认索引
import pandas as pd
s=pd.Series(['卢智勇','苏国晖','崔宇','程源'])
print(s)

例2:索引 index
import pandas as pd
s=pd.Series(['卢智勇','苏国晖','崔宇','程源'], index=['a','b','c','d'])
print(s)
例3:迭代对象的输出
import pandas as pd
s=pd.Series(['卢智勇','苏国晖','崔宇','程源'])
for i in s:
print(i)


