I am novice using VBA to organize some data in an Excel sheet. I also have some experience in Python if that is easier.
I have a .csv file from a model that outputs a discontinuous time series (whenever there is inflow but not every 1-min time step):
Date/Time Drainage cm/BRA
5/10/14 11:00 0
5/10/14 11:01 1
5/10/14 11:02 2
5/10/14 11:03 2
5/10/14 11:04 1
5/11/14 7:00 1
5/11/14 7:01 0
5/11/14 7:02 1
5/11/14 7:03 1
5/11/14 7:04 0
5/11/14 7:05 0
What I want is to be able to aggregate the data to 2-min time steps. So that I get this:
Date/Time Drainage cm/BRA
5/10/14 11:00 1
5/10/14 11:02 4
5/10/14 11:04 1
5/10/14 11:06 0
5/10/14 11:08 0
...
...
5/11/14 6:58 0
5/11/14 7:00 1
5/11/14 7:02 2
5/11/14 7:04 0
I already have a code that will aggregate the data for me as long as I have a continuous data file (in this example filling in the gaps between 5/10/14 11:04 to 5/11/14 7:00). As you can imagine, with minute data, there is too much to manually fill the gaps not to mention that I have to reproduce this for over 70 output files.
Any suggestions for creating a continuous time series or aggregating to 2-min despite uneven gaps in the time series??