I have a dataframe A with 2 columns namely "Amount" and "Number of times". I would like to create a new dataframe B which repeats the "Amount" in dataframe A according to "Number of times". For example, if the first row in dataframe A has "Ammount"=50 and "Number of times"=4 and the second row has "Amount"=80 and "Number of times"=2, I want to create a new dataframe B as shown below:
50 50 50 50
80 80
So, the rows of dataframe B will have different length. Please help!