cudf.Series.fillna#
- Series.fillna(
- value: None | ScalarLike | Series,
- *,
- axis: Axis | None = None,
- inplace: bool = False,
- limit: int | None = None,
Fill null values with
value.- Parameters:
- valuescalar, Series-like or dict
Value to use to fill nulls. If Series-like, null values are filled with values in corresponding indices. A dict can be used to provide different values to fill nulls in different columns.
- Returns:
- resultSeries
Copy with nulls filled.
Examples
>>> import cudf >>> ser = cudf.Series(['a', 'b', None, 'c']) >>> ser 0 a 1 b 2 NaN 3 c dtype: str >>> ser.fillna('z') 0 a 1 b 2 z 3 c dtype: str
fillnacan also supports inplace operation:>>> ser.fillna('z', inplace=True) >>> ser 0 a 1 b 2 z 3 c dtype: str