一、重新索引
(1)reindex方式
obj = pd.Series(['blue', 'purple', 'yellow'], index=[0, 2, 4]) print(obj) obj.reindex(range(6), method='ffill')#使用ffill可以实现前向值填充 print(obj)obj = pd.Serie
一、重新索引
(1)reindex方式
obj = pd.Series(['blue', 'purple', 'yellow'], index=[0, 2, 4]) print(obj) obj.reindex(range(6), method='ffill')#使用ffill可以实现前向值填充 print(obj)obj = pd.Serie