I have a list of objects by each name and a dataframe like this.(it's a big one)
Jason = ['chair','table','pencil']
Miguel = ['smartphone','cake']
Johana = ['clock','paper']
| id | name |
|---|---|
| 1 | Jason |
| 2 | Miguel |
| 3 | Johana |
I would like to use a loop that allows me to obtain the following result because I have a large database in which many rows have to be added for each name index. I would like to have the following result with a loop.
| id | name | picks |
|---|---|---|
| 1 | Jason | chair |
| 1 | Jason | table |
| 1 | Jason | pencil |
| 2 | Miguel | smartphone |
| 2 | Miguel | cake |
| 3 | Johana | clock |
| 3 | Johana | paper |