xorbits.pandas.Index.insert#

Index.insert(loc: int, item) pandas.core.indexes.base.Index[源代码]#

Make new Index inserting new item at location.

Follows Python numpy.insert semantics for negative values.

参数
  • loc (int) –

  • item (object) –

返回类型

Index

实际案例

>>> idx = pd.Index(['a', 'b', 'c'])  
>>> idx.insert(1, 'x')  
Index(['a', 'x', 'b', 'c'], dtype='object')

警告

This method has not been implemented yet. Xorbits will try to execute it with pandas.

This docstring was copied from pandas.core.indexes.base.Index.