Hierarchical data structures
DataFrame
can represent hierarchical data structures using two special types of columns:
ColumnGroup
is a group of columnsFrameColumn
is a column of dataframes
You can read DataFrame
from json or from in-memory object graph preserving original tree structure.
Hierarchical columns can also appear as a result of some modification operations:
group produces
ColumnGroup
groupBy produces
FrameColumn
pivot may produce
FrameColumn
split of
FrameColumn
will produce severalColumnGroup
implode converts
ColumnGroup
intoFrameColumn
explode converts
FrameColumn
intoColumnGroup
merge converts
ColumnGroup
intoFrameColumn
etc.
Operations in the navigation tree are grouped such that you can find operations and their respective inverse together, like group
and ungroup
. This allows you to quickly find out how to simplify any hierarchical structure you come across.