python的dataframe删除原来索引,重新建立从0开始的索引

来源:互联网 发布:护眼显示器 知乎 编辑:程序博客网 时间:2024/06/13 22:46
def test4():    obj3 = Series(['blue', 'purple', 'yellow'], index=[0, 2, 4])    print obj3    obj4 = obj3.reset_index(drop=True)    print obj4    print type(obj4)

1 0
原创粉丝点击