nested_to_record(ds, prefix: 'str' = '', sep: 'str' = '.', level: 'int' = 0, max_level: 'int | None' = None)
Converts a nested dict into a flat dict ("record"), unlike json_normalize, it does not attempt to extract a subset of the data.
Nested records will generate names separated by sep, e.g., for sep='.', { 'foo' : { 'bar' : 0 } } -> foo.bar
The number of levels in the json string.
The max depth to normalize.
A simplified json_normalize
>>> nested_to_record(See :
... dict(flat1=1, dict1=dict(c=1, d=2), nested=dict(e=dict(c=1, d=2), d=2))
... ) {'flat1': 1, 'dict1.c': 1, 'dict1.d': 2, 'nested.e.c': 1, 'nested.e.d': 2, 'nested.d': 2}
The following pages refer to to this document either explicitly or contain code examples using this.
pandas.io.json._normalize.nested_to_record
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them