python基础-7-数据分析python——pandas——Series

pandas Series是近似于数组的一维结构

//input
import pandas as pd
s1 = pd.Series([1,2,3,4])
s1

//output
0    1
1    2
2    3
3    4
dtype: int64
//input
import pandas as pd
s2=pd.Series([1,2,3,4],index = ['a','b','c','d'])
s2

//output
a    1
b    2
c    3
d    4
dtype: int64

你可能感兴趣的:(python基础-7-数据分析python——pandas——Series)