I have the following dataframe:
| Week | info |
| ---- | ---- |
| 1 |{'Info': 'text', 'value': 94615}, {'Info': 'text_2', 'value': 111968}|
| 2 |{'Info': 'text', 'value': 234}, {'Info': 'text_2', 'InfoB': 236}|
| 3 |{'Info': 'text', 'value': 524523}, {'Info': 'text_2', 'InfoB': 5555}|
I would like to open up the dictionaries under info and am thinking that I should maybe re-shape the dataframe into a multiple-column index... perhaps by converting it into a multiple-column indexes dataframe as follows:
| Week | info |
| | text | text_2 |
| ---- | ------ | ------- |
| 1 | 94615 | 111968 |
| 2 | 234 | 236 |
| 3 | 524523 | 5555 |
Any suggestions how can I do this? Also what's the best way to perform aggregation to this data, (e.g. mean of text, sum of week 1) pivot table perhaps?