I'm struggling with simple lambda to convert list of nested dicts stored in df column but got stuck.
My df looks like
index synthkey celldata
0 870322681ffffff [{'3400_251': {'s': -77, 'q': -8}}, {'3400_426': {'s': -116, 'q': -16}}]
0 87032268effffff [{'3400_376': {'s': -97, 'q': -12}}, {'3400_426': {'s': -88, 'q': -12}}]
What I'd like to achieve is to have it like that:
index synthkey celldata
0 870322681ffffff {'3400_251': {'s': -77, 'q': -8},'3400_426': {'s': -116, 'q': -16}}
I've tried multiple attempts like:
df['dicts'] = df['celldata'].apply(lambda x: {}.update(*x))
or
df['dicts'] = df.apply(lambda x: {*x['celldata']})
but it got me nowhere near the solution.
Thanks!