Pandas-Series
Python“玩”数据的利器!
Series
Series是一个能够容纳任意数据类型的带标记的一维数组。(Series is a one-dimensional labeled array capable of holding any data type (integers, strings, floating point numbers, Python objects, etc.). The axis labels are collectively referred to as the index. )
初始化
从map初始化
1 | import numpy as np |
从数组初始化
1 | 1, 2, 3), (4, 5, 6), (7, 8, 9)], data = np.array([( |
转化为list
1 | s.tolist() |
转化为dict
1 | 1, 2, 3, 4]) s = pd.Series([ |
评论系统未开启,无法评论!