pandas基础2
2019-01-18 本文已影响26人
SugeonYen
前情提要,pandas基础1中记录了Series、DataFrame的行列操作、切片索引、数学运算等内容
索引对象 即索引的对象

索引对象的不可变性,使得在多种数据结构中分享索引对象更为安全:

关于arange
#一个参数 默认起点0,步长为1 输出:[0 1 2]
a = np.arange(3)
#两个参数 默认步长为1 输出[3 4 5 ]
a = np.arange(3,6)
#三个参数 起点为0,终点为4,步长为0.1 输出[ 0. 0.5 1. 1.5 2. 2.5 ]
a = np.arange(0, 3, 0.5)
重建索引 reindex

ffill方法插值,reindex



