I have a problem with my data preparation, I have two time series dataframes which I want to merge into a 30-minute interval. The first dataset is in a 10minute interval while the others in a 15 minutes interval, ideally it should be possible to join this to form a 30-minute interval DF
I tried the guide here, but I can't seem to get it, and I think it only allows the frequence - 'H' and this SO question.
DF_A
TIME LEVELS_A
0 0 0
1 900 0
2 1800 0
3 2700 0
4 3600 0
5 4500 0
DF_B
TIME LEVELS_B
0 0 2.16
1 600 2.16
2 1200 2.12
3 1800 1.989382667
4 2400 1.989382667
5 3000 1.989382667
Expected results are:
DF_MERGED
TIME LEVELS_A LEVELS_B
0 0
1 1800 2.16, 2.16, 2.16 0,0
2 3600 2.16, 2.16, 2.16 0,1
3 5400 2.16, 2.16, 2.16 1,0
4 7200 2.16, 2.16, 2.16 1,0
5 9000 2.16, 2.16, 2.16 0,0
Everything is already imputed so it's unlike to have any 'NaN's. also, for every three LEVELS_A there are two LEVELS_B. How should this be merged with pd.Datframe?
or perhaps, I just want to get the max of each entry so it would be ...
DF_MERGED_V2
TIME LEVELS_A LEVELS_B
0 0
1 1800 2.16 0
2 3600 2.16 1
3 5400 2.16 1
4 7200 2.16 1
5 9000 2.16 0
I want to programatically do this with pandas