xorbits.pandas.Index.fillna#

Index.fillna(value=None)#

Fill NA/NaN values with the specified value.

参数
  • value (scalar) – Scalar value to use to fill holes (e.g. 0). This value cannot be a list-likes.

  • downcast (dict, default is None (Not supported yet)) –

    A dict of item->dtype of what to downcast if possible, or the string ‘infer’ which will try to downcast to an appropriate equal type (e.g. float64 to int64 if possible).

    2.1.0(pandas) 版后已移除.

返回类型

Index

参见

DataFrame.fillna

Fill NaN values of a DataFrame.

Series.fillna

Fill NaN Values of a Series.

实际案例

>>> idx = pd.Index([np.nan, np.nan, 3])  
>>> idx.fillna(0)  
Index([0.0, 0.0, 3.0], dtype='float64')

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