I have a dataframe like this:
ID value repeat ratio
0 0 IDx10 6 0.5
1 1 IDx11 7 1.5
2 2 IDx12 8 2.5
and i have a list like this: l = [1,2]
What i want to do is to duplicate every row the number of times of the length of the list and in every new row put each value of the list.
And getting a dataframe like this:
ID value repeat ratio value
0 0 IDx10 6 0.5 1
1 0 IDx10 6 0.5 2
2 1 IDx11 7 1.5 1
3 1 IDx11 7 1.5 2
4 2 IDx12 8 2.5 1
5 2 IDx12 8 2.5 2