How do you convert a column in a Python Pandas DataFrame that has one column with name value pairs into additional columns within the same dataframe.
The column (attrs) with the named value pairs has values like :
[{'attr_id': 7, 'val': '4.00'}, {'attr_id': 8, 'val': '2.50'}, {'attr_id': 9, 'val': '1750'}, {'attr_id': 11, 'val': 'false'}, {'attr_id': 10, 'val': 'false'}]
[{'attr_id': 7, 'val': '2.00'}, {'attr_id': 8, 'val': '1.00'}, {'attr_id': 11, 'val': 'false'}, {'attr_id': 10, 'val': 'false'}]
[{'attr_id': 11, 'val': 'false'}, {'attr_id': 10, 'val': 'false'}]
So for the first record, the new columns I am trying to create would be attr_id7, attr_id8, attr_id9, attr_id10, attr_id11 and have values 4.00,2.50,1750,false,false
Considering converting column content into proper Python dictionary and then using something like the answer Splitting dictionary/list inside a Pandas Column into Separate Columns