One - One Code All

Blog Content

python的dataframe重设索引reset_index(drop=True)

Python   2011-02-26 22:02:14

重设索引

def test4():
    obj3 = Series(['blue', 'purple', 'yellow'], index=[0, 2, 4])
    print obj3
    obj4 = obj3.reset_index(drop=True)
    print obj4
    print type(obj4)



上一篇:pandas中关于set_index和reset_index的用法
下一篇:python 批量修改文件名

The minute you think of giving up, think of the reason why you held on so long.