pandas 1.4.2

NotesParametersReturns
_get_level_values(self, level) -> 'Index'

This is primarily useful to get an individual level of values from a MultiIndex, but is provided on Index as well for compatibility.

Notes

For Index, level should be 0, since there are no multiple levels.

Parameters

level : int or str

It is either the integer position or the name of the level.

Returns

Index

Calling object, as there is only one level in the Index.

Return an Index of values for requested level.

See Also

MultiIndex.get_level_values

Get values for a level of a MultiIndex.

Examples

This example is valid syntax, but we were not able to check execution
>>> idx = pd.Index(list('abc'))
... idx Index(['a', 'b', 'c'], dtype='object')

Get level values by supplying :None:None:`level` as integer:

This example is valid syntax, but we were not able to check execution
>>> idx.get_level_values(0)
Index(['a', 'b', 'c'], dtype='object')
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/indexes/base.py#1972
type: <class 'function'>
Commit: