How can I visualise contents of nested dictionary in python before knowing what's inside?

163 Views Asked by At

I'm working with data packed into nested dictionary with structure that might look like this:

outer_dict
| key1
| | key11
| | | key111: value
| | | key112: value
| | key12: value
| | key13:value
| key2
| | key21: value
| | key22
| | | key221: value
| | | key222
| | | | key2221: value
| key3
| key4 ...

and I don't know yet how many levels it has and what is the data type of each "final" value (and don't have access to detailed documentation of dataset). What is an easy way to examine structure of such data (preferably to visualize in form of graph)? My only idea so far is to write a function that iterates over keys and prints something like above.

This is the beginning of working with that data: enter image description here

0

There are 0 best solutions below