I'm trying to convert a nested JSON file to a dataframe. The dataframe now looks like this:
| product | shelfId |
|---|---|
| {'product': [{'id': '111', 'quantity': 10}]} | aaa |
| {'product': [{'id': '222', 'quantity': 0}]} | bbb |
Now I want to flatten the product column, and get a df like:
| productId | productQuantity | shelfId |
|---|---|---|
| 111 | 10 | aaa |
| 222 | 0 | bbb |
Is there a way to do it?