Say I have a pandas.DataFrame
like:
val
2020-01-01 12
2020-04-15 38
2020-05-03 19
How can I create a pandas.DataFrame
like:
val
2020-01-01 00:00:00 12
2020-01-01 00:01:00 12
...
2020-01-01 23:58:00 12
2020-01-01 23:59:00 12
2020-04-15 00:00:00 38
2020-04-15 00:01:00 38
...
2020-04-15 23:58:00 38
2020-04-15 23:59:00 38
2020-05-03 00:00:00 19
2020-05-03 00:01:00 19
...
2020-05-03 23:58:00 19
2020-05-03 23:59:00 19
I have tried df.resample('1 min').asfreq()
but that gives me all the minutes from the first row to the last row, including all the days that aren't in the original index.