I'm fairly new to Python and StackOverflow, so forgive me for my terrible formatting. I had a question about duplicating rows in a DataFrame. I have a data set that looks like this.
| WEIGHT | AGE | DEBT | ASSETS |
|---|---|---|---|
| 2 | 34 | 4000 | 10000 |
| 3 | 42 | 3000 | 4000 |
I would like to duplicates the rows by the WEIGHT, so I will end up with the following:
| WEIGHT | AGE | DEBT | ASSETS |
|---|---|---|---|
| 2 | 34 | 4000 | 10000 |
| 2 | 34 | 4000 | 10000 |
| 3 | 42 | 3000 | 4000 |
| 3 | 42 | 3000 | 4000 |
| 3 | 42 | 3000 | 4000 |
I don't have a clue where to start and would appreciate any help!