to_frame(self, index: 'bool' = True, name=<no_default>) -> 'DataFrame'
Column ordering is determined by the DataFrame constructor with data as a dict.
Set the index of the returned DataFrame as the original MultiIndex.
The passed names should substitute index level names.
Create a DataFrame with the levels of the MultiIndex as columns.
DataFrame
Two-dimensional, size-mutable, potentially heterogeneous tabular data.
>>> mi = pd.MultiIndex.from_arrays([['a', 'b'], ['c', 'd']])This example is valid syntax, but we were not able to check execution
... mi MultiIndex([('a', 'c'), ('b', 'd')], )
>>> df = mi.to_frame()This example is valid syntax, but we were not able to check execution
... df 0 1 a c a c b d b d
>>> df = mi.to_frame(index=False)This example is valid syntax, but we were not able to check execution
... df 0 1 0 a c 1 b d
>>> df = mi.to_frame(name=['x', 'y'])See :
... df x y a c a c b d b d
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