See the :None:None:`user guide
<https://pandas.pydata.org/pandas-docs/stable/user_guide/advanced.html>`
for more.
The unique labels for each level.
Integers for each level designating which label at each location.
Level of sortedness (must be lexicographically sorted by that level).
Names for each of the index levels. (name is accepted for compat).
Copy the meta-data.
Check that the levels/codes are consistent and valid.
A multi-level, or hierarchical, index object for pandas objects.
Index
The base pandas Index type.
MultiIndex.from_arrays
Convert list of arrays to MultiIndex.
MultiIndex.from_frame
Make a MultiIndex from a DataFrame.
MultiIndex.from_product
Create a MultiIndex from the cartesian product of iterables.
MultiIndex.from_tuples
Convert list of tuples to a MultiIndex.
A new MultiIndex
is typically constructed using one of the helper methods MultiIndex.from_arrays
, MultiIndex.from_product
and MultiIndex.from_tuples
. For example (using .from_arrays
):
>>> arrays = [[1, 1, 2, 2], ['red', 'blue', 'red', 'blue']]
... pd.MultiIndex.from_arrays(arrays, names=('number', 'color')) MultiIndex([(1, 'red'), (1, 'blue'), (2, 'red'), (2, 'blue')], names=['number', 'color'])
See further examples for how to construct a MultiIndex in the doc strings of the mentioned helper methods.
See :The following pages refer to to this document either explicitly or contain code examples using this.
pandas.core.frame.DataFrame.count
pandas.core.frame.DataFrame.reset_index
pandas.core.indexes.multi.MultiIndex.isin
pandas.core.frame.DataFrame.iterrows
pandas.core.indexes.base.Index
pandas.core.indexes.base.Index.isin
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