I have an empty dataframe (data) that I definied as follows:
data=pd.DataFrame({'A':[],'B':[],'C':[],'D':[]})
and by means of a for loop I am obtaining several temporary dataframes that look like this:
index order_count
C 3
A 1
B 1
I would like to populate "data" by using the data these temporary dataframes. I guess I would have to check for the "order_count" column into the "index" and add the corresponding "order_count". After that, perhaps concatenate the temporary results.
I would like to obtain the following output for "data":
time_interval A B C D
1 1 1 3 0
2 1 1 1 1
...