I'm working with a dataframe which in one of the columns have nested dictionaries.
df = {"Name": "XYZ", "Age": 42,
{"Place":{"KeyA": {"SubKey1": 0.2, "SubKey2": "value2"}}}
So my flat df is:
Name - Age - Place
XYZ - 42 - {"KeyA": {"SubKey-1": 0.2, "SubKey2": "value2"}}
I'm trying to break down the content of that column and transform it on multiple columns to end up with something like this:
Name - Age - KeyA-SubKey1 - KeyA-SubKey2
X - 42 - 0.2 - value2
But everything I was able to come up with so far ended up with KeyError
or Length of values does not match length of index
.
Any help will be appreciated