how can I change a datetimeindex format index into a panda dataset with the contents of another column?

49 Views Asked by At

I would like to change the index of the following dataframe

           Timestamp     Open     High      Low    Close  Volume
2020-09-18  16:12:00  1.07852  1.07852  1.07834  1.07841     111
2020-09-18  16:11:00  1.07843  1.07853  1.07841  1.07851      80
2020-09-18  16:10:00  1.07841  1.07847  1.07841  1.07842      69
2020-09-18  16:09:00  1.07843  1.07848  1.07840  1.07841     243
2020-09-18  16:08:00  1.07850  1.07851  1.07841  1.07843      76

in this new dataframe with a new index like this

                      Open     High      Low    Close  Volume
2020-09-18 16:12:00  1.07852  1.07852  1.07834  1.07841     111
2020-09-18 16:11:00  1.07843  1.07853  1.07841  1.07851      80
2020-09-18 16:10:00  1.07841  1.07847  1.07841  1.07842      69
2020-09-18 16:09:00  1.07843  1.07848  1.07840  1.07841     243
2020-09-18 16:08:00  1.07850  1.07851  1.07841  1.07843      76
0

There are 0 best solutions below