Flatten dicts of dicts in DataFrame

Maybe there is something here that (suitably adapted) could be useful for you. Can you provide some minimal but exhaustive examples of the cases that interest you?