pandas(一)-- Series创建及索引
生活随笔
收集整理的這篇文章主要介紹了
pandas(一)-- Series创建及索引
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
- 通過數組的方法
- 通過字典的方法
兩種方式的輸出均為:
Jack 90.0 Marry 92.0 Tom 89.0 Zack 65.0 dtype: float64在原始序列的基礎上,添加兩行
查看打印出來的結果
******* s2 **********0 -0.388924 1 -0.866639 2 0.045354 Name: test, dtype: float64 ******* s3 **********0 -0.388924 1 -0.866639 2 0.045354 0 100.000000 11 200.000000 Name: hehehe, dtype: float64 **** s2.index **** RangeIndex(start=0, stop=3, step=1) **** s3.index **** Index([0, 1, 2, '0', '11'], dtype='object')總結
以上是生活随笔為你收集整理的pandas(一)-- Series创建及索引的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python--numpy
- 下一篇: pandas(二) -- Datafra