I'm currently getting a panda data frame from alpaca - a stock trading platform. The data I'm getting is for minute data and is giving me a timestamp that cant be converted to DateTime to make my functions easier. Heres an output for AMZN minute data
open high low
timestamp
2019-08-08 14:12:00-04:00 1826.8600 1826.9649 1826.1026
2019-08-08 14:13:00-04:00 1826.6500 1827.6520 1826.6500
Heres the data type:
print(type(AMZN.index[0]))
<class'pandas._libs.tslibs.timestamps.Timestamp'>
I'm trying to split this index into two columns where the day is the index and the time(minutes and hours) is the next column. Or just getting it into all into datetime format together would work fine too.
I've tried finding a similar problem and using _datetime() but it doesn't seem to work. I have the datetime library but it doesn't seem to register when I use the code as in other posts.
Overall Im just trying to find an easy way of iterating over a certain time on any given day and this format is giving me trouble. If someone has a better way of dealing with time series of this type please feel free to share.