I have a dataset with a 1-second timestep in the form of a CSV with the following format:
2021-02-07 11:00:30, 64.8
2021-02-07 11:00:31, 64.8
2021-02-07 11:00:35, 50.3
..
..
and so on and so forth. The problem is, it only has entries for when the value at that time is larger than zero, all the values that are equal to zero are simply not recorded. So the dataset starts at the first nonzero value at 2021-02-07 11:00:30
I'm trying to create another, larger CSV that has the time from 2021-02-07 00:00:00 to 2021-02-07 23:59:59 (covering the entire 24-hour period, 1-second steps) and basically fill all the values that are missing from the original CSV with zeroes. Something like this:
..
..
2021-02-07 11:00:30, 64.8
2021-02-07 11:00:31, 64.8
2021-02-07 11:00:32, 0
2021-02-07 11:00:33, 0
2021-02-07 11:00:34, 0
2021-02-07 11:00:35, 50.3
..
..
I'm not sure how to implement that. Can anyone please advise? P.S: Please note that the values are completely missing, there are no rows for them. It's not a NaN situation.