A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://pandas.pydata.org/docs/dev/development/../reference/api/pandas.Index.get_level_values.html below:

pandas.Index.get_level_values — pandas 3.0.0.dev0+2231.g4f2aa4d2be documentation

pandas.Index.get_level_values#
Index.get_level_values(level)[source]#

Return an Index of values for requested level.

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

Parameters:
levelint 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.

Notes

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

Examples

>>> idx = pd.Index(list("abc"))
>>> idx
Index(['a', 'b', 'c'], dtype='object')

Get level values by supplying level as integer:

>>> idx.get_level_values(0)
Index(['a', 'b', 'c'], dtype='object')

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4