A RetroSearch Logo

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

Search Query:

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

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

pandas.Index.get_indexer_for#
final Index.get_indexer_for(target)[source]#

Guaranteed return of an indexer even when non-unique.

This dispatches to get_indexer or get_indexer_non_unique as appropriate.

Parameters:
targetIndex

An iterable containing the values to be used for computing indexer.

Returns:
np.ndarray[np.intp]

List of indices.

See also

Index.get_indexer

Computes indexer and mask for new index given the current index.

Index.get_non_unique

Returns indexer and masks for new index given the current index.

Examples

>>> idx = pd.Index([np.nan, "var1", np.nan])
>>> idx.get_indexer_for([np.nan])
array([0, 2])

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