What is the fastest way to expand (copy n times) the rows of a dataframe based on a value of a column. So, if the value of the column in that row is 10, that row has to be copied 10 times.
Example:
import pandas as pd
df = pd.DataFrame({"A":[1,45], "B":[2,3]})
operation
The result should look like this:
A B
1 2
1 2
45 3
45 3
45 3