美文网首页
python基础-7-数据分析python——pandas——S

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

作者: 比特跃动 | 来源:发表于2019-03-20 21:10 被阅读0次

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——S

      本文链接:https://www.haomeiwen.com/subject/imkxvqtx.html