xorbits.pandas.Index.putmask#

Index.putmask(mask, value) pandas.core.indexes.base.Index[源代码]#

Return a new Index of the values set with the mask.

返回类型

Index

参见

numpy.ndarray.putmask

Changes elements of an array based on conditional and input values.

实际案例

>>> idx1 = pd.Index([1, 2, 3])  
>>> idx2 = pd.Index([5, 6, 7])  
>>> idx1.putmask([True, False, False], idx2)  
Index([5, 2, 3], dtype='int64')

警告

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.