pyflink.dataframe.DataFrame.fill_nan#
- DataFrame.fill_nan(value: Any, subset: Optional[List[str]] = None) pyflink.dataframe.dataframe.DataFrame[source]#
Replace NaN values with a given value in float columns.
Does NOT replace null — use
fill_null()for that. Non-float columns insubsetare silently ignored since NaN only applies to float/double types.- Parameters
value – The value to replace NaN with.
subset – Column names to fill. If None, fills all float columns.
- Returns
A new DataFrame with NaN values replaced.
- Example::
>>> df.fill_nan(0.0) # fill all float columns >>> df.fill_nan(0.0, subset=["a"]) # fill only float column "a"