Currently I have a dataframe that looks like the following:
df =
Open High Low Close TotalVolume
0 113.40 113.54 113.40 113.54 7237
1 113.54 113.58 113.52 113.57 10099
2 113.59 113.81 113.52 113.78 13827
3 113.76 113.94 113.75 113.92 16129
4 113.91 114.01 113.88 113.97 27052
5 113.97 114.11 113.92 114.01 24925
6 114.00 114.15 113.99 114.04 13461
7 114.06 114.14 113.94 113.94 10702
8 113.92 113.99 113.86 113.99 5538
9 113.96 113.96 113.85 113.86 14000
It does not necessarily have to be a datetime index but I felt like it would be the easiest. From this I have a variable startDate that follows this format
startDate = "03-20-2018t14:00"
From this, this is minute data and for it to run another program, the format has to follow this, but this is the end result I am hoping for:
updated_df =
Date Time Open High Low Close TotalVolume
03/20/2018 14:00 113.40 113.54 113.40 113.54 7237
03/20/2018 14:01 113.54 113.58 113.52 113.57 10099
03/20/2018 14:02 113.59 113.81 113.52 113.78 13827
03/20/2018 14:03 113.76 113.94 113.75 113.92 16129
03/20/2018 14:04 113.91 114.01 113.88 113.97 27052
03/20/2018 14:05 113.97 114.11 113.92 114.01 24925
03/20/2018 14:06 114.00 114.15 113.99 114.04 13461
03/20/2018 14:07 114.06 114.14 113.94 113.94 10702
03/20/2018 14:08 113.92 113.99 113.86 113.99 5538
03/20/2018 14:09 113.96 113.96 113.85 113.86 14000