I have a dataframe like this:
import pandas as pd
frame={'location': {(2, 'eng', 'US'): {"['sc']": 3, "['delhi']": 2, "['sonepat', 'delhi']": 1, "['new delhi']": 1}}}
df=pd.DataFrame(frame)
df.head()
Output
location
2 eng US {"['sc']": 3, "['delhi']": 2, "['sonepat', 'delhi']": 1, "['new delhi']": 1}
And i want to change the type inside the column df['location'] to not list, like :
location
2 eng US {'sc': 3, 'delhi': 2, 'sonepat', 'delhi': 1, 'new delhi': 1}