I’m trying to clean a data set and I am stuck at the last step.
The main dataframe, that I call maindf, will contain all the data and has 3000 rows and 200 columns, like this
Each row of maindf will be filled with a time series.
Each time series, called tempdf, is a data frame with one row:
I would like that each observation in tempdf automatically goes into the proper part of maindf. I would then iterate by sending the first time series in the first row of maindf etc.
The problem is that each series has a different number of observations, and there may be holes in the dates, so I do not know how to match them properly.
The data set is small so I am more interested in a simple solution than an efficient one. I tried all my knowledge of dataframes and joins but this is beyond me.