pandas 1.4.2

ParametersReturns
restore_dropped_levels_multijoin(left: 'MultiIndex', right: 'MultiIndex', dropped_level_names, join_index: 'Index', lindexer: 'npt.NDArray[np.intp]', rindexer: 'npt.NDArray[np.intp]') -> 'tuple[list[Index], npt.NDArray[np.intp], list[Hashable]]'

Returns the levels, labels and names of a multi-index to multi-index join. Depending on the type of join, this method restores the appropriate dropped levels of the joined multi-index. The method relies on lidx, rindexer which hold the index positions of left and right, where a join was feasible

Parameters

left : MultiIndex

left index

right : MultiIndex

right index

dropped_level_names : str array

list of non-common level names

join_index : Index

the index of the join between the common levels of left and right

lindexer : np.ndarray[np.intp]

left indexer

rindexer : np.ndarray[np.intp]

right indexer

Returns

levels : list of Index

levels of combined multiindexes

labels : np.ndarray[np.intp]

labels of combined multiindexes

names : List[Hashable]

names of combined multiindex levels

this is an internal non-public method

Examples

See :

Local connectivity graph

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


File: /pandas/core/reshape/merge.py#1512
type: <class 'function'>
Commit: