I have two dataframes, one with the input info and one with the output:
df_input:
index col1 col2
0 'A' 'B'
1 'B' 'H'
2 'C' 'D'
df_output:
index vectors
0 [[D, 0.5],[E, 0.3]]
1 [[A, 0.3]]
2 [[B, 0.8],[C, 0.5],[H, 0.2]]
The output its a array of arrays. Variable in quantity.
What I need is map the index and append every vector in a row, like this:
df:
index col1 col2 val1 val2
0 'A' 'B' 'D' 0.5
1 'A' 'B' 'E' 0.3
2 'B' 'H' 'A' 0.3
3 'C' 'D' 'B' 0.8
4 'C' 'D' 'C' 0.5
5 'C' 'D' 'H' 0.2
the df its very large so im trying to avoid a loop if its possible.
thank you in advance estimates.