modin.pandas.Index.drop¶
- Index.drop(labels: Any, errors: Literal['ignore', 'raise'] = 'raise') Index [source] (https://github.com/snowflakedb/snowpark-python/blob/v1.21.0/src/snowflake/snowpark/modin/plugin/extensions/index.py#L911-L943)¶
Make new Index with the passed list of labels deleted.
- Parameters:
labels (array-like or scalar) –
errors ({'ignore', 'raise'}, default 'raise') – If ‘ignore’, suppress the error and existing labels are dropped.
- Returns:
The index created will have the same type as self.
- Return type:
- Raises:
KeyError – If all labels are not found in the selected axis
Examples
>>> idx = pd.Index(['a', 'b', 'c']) >>> idx.drop(['a']) Index(['b', 'c'], dtype='object')