I have a loop which runs 3 times, and each time produces 4 values, e.g. below.
for i in range(0, 3):
val1 = something
val2 = something
val3 = something
val4 = something
From this loop, how can I create a dataframe of size (3x4) as follows?
val1 val2 val3 val4
2 4 5 42
12 23 54 65
4 12 2 89