A RetroSearch Logo

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

Search Query:

Showing content from https://pandas.pydata.org/pandas-docs/stable/reference/api/../api/pandas.Index.take.html below:

pandas.Index.take — pandas 2.3.1 documentation

pandas.Index.take#
Index.take(indices, axis=0, allow_fill=True, fill_value=None, **kwargs)[source]#

Return a new Index of the values selected by the indices.

For internal compatibility with numpy arrays.

Parameters:
indicesarray-like

Indices to be taken.

axisint, optional

The axis over which to select values, always 0.

allow_fillbool, default True
fill_valuescalar, default None

If allow_fill=True and fill_value is not None, indices specified by -1 are regarded as NA. If Index doesn’t hold NA, raise ValueError.

Returns:
Index

An index formed of elements at the given indices. Will be the same type as self, except for RangeIndex.

See also

numpy.ndarray.take

Return an array formed from the elements of a at the given indices.

Examples

>>> idx = pd.Index(['a', 'b', 'c'])
>>> idx.take([2, 2, 1, 2])
Index(['c', 'c', '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