Make new Index with passed list of labels deleted.
If ‘ignore’, suppress error and existing labels are dropped.
Will be same type as self, except for RangeIndex.
If not all of the labels are found in the selected axis
Examples
>>> idx = pd.Index(['a', 'b', 'c'])
>>> idx.drop(['a'])
Index(['b', 'c'], dtype='object')
© 2008–2011, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
© 2011–2025, Open source contributors
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/2.3.0/reference/api/pandas.Index.drop.html