Python之DataFrame将列作为索引

如下代码可将df的columns列作为索引列

df=df.set_index(['columns'],inplace=True)

posted @ 2018-10-11 15:11  飞哥霸气  阅读(14602)  评论(0编辑  收藏  举报