modin.pandas.Index.get_indexer_for¶
- Index.get_indexer_for(target: Any) Any [source] (https://github.com/snowflakedb/snowpark-python/blob/v1.21.0/src/snowflake/snowpark/modin/plugin/extensions/index.py#L2140-L2160)¶
Guaranteed return of an indexer even when non-unique.
This dispatches to get_indexer or get_indexer_non_unique as appropriate.
- Returns:
List of indices.
- Return type:
np.ndarray[np.intp]
Examples
Note Snowpark pandas converts np.nan, pd.NA, pd.NaT to None >>> idx = pd.Index([np.nan, ‘var1’, np.nan]) >>> idx.get_indexer_for([None]) array([0, 2])