Dataframe set_index not setting

前端 未结 1 1318
暗喜
暗喜 2020-11-27 08:18

I have a dataframe and am trying to set the index to the column \'Timestamp\'. Currently the index is just a row number. An example of Timestamp\'s format is: 2015-0

相关标签:
1条回答
  • 2020-11-27 08:45

    You need to either specify inplace=True, or assign the result to a variable. Try:

    df.set_index('Timestamp', inplace=True, drop=True)
    
    0 讨论(0)
提交回复
热议问题