I load a DataFrame from a database and have a column that is a dict, like so:
id some_value ... coordinates
15 34.7 {'type': 'Point', 'coordinates': [-3.2, 37.0]}
However, when I save my DataFrame to disk using pd.to_csv() and then re-read it, the column containing the coordinates is not a dict, but a string:
id some_value ... coordinates
15 34.7 "{'type': 'Point', 'coordinates': [-3.2, 37.0]}"
How can I tell Pandas to read this column as a dict, or how can I convert this column back into a dict?