databricks.koalas.Index.fillna

Index.fillna(value: Union[int, float, str, bytes, decimal.Decimal, datetime.date, None]) → databricks.koalas.indexes.base.Index[source]

Fill NA/NaN values with the specified value.

Parameters
valuescalar

Scalar value to use to fill holes (e.g. 0). This value cannot be a list-likes.

Returns
Index :

filled with value

Examples

>>> ki = ks.DataFrame({'a': ['a', 'b', 'c']}, index=[1, 2, None]).index
>>> ki
Float64Index([1.0, 2.0, nan], dtype='float64')
>>> ki.fillna(0)
Float64Index([1.0, 2.0, 0.0], dtype='float64')