I have a dataframe where one column is full of dicts:
Col
Index1 {"A":1, "B":2, "C":3}
Index2 {"A":4, "B":5, "C":6}
.
.
.
I would like a new dataframe as such:
A B C
Index1 1 2 3
Index2 4 5 6
.
.
.
As you can see, the dict keys in the DF column should become the new headers. Ideally I would like to preserve the indexes.
I have attempted to this using from_dict to create a new Dataframe from that column, but it is not working.
I.e.
new_DF = pd.DataFrame.from_dict(old_DF[Col])
And I am getting the error: ValueError: If using all scalar values, you must pass an index
I have tried other methods as well to no avail. Any guidance would be appreciated.