Ctrl+K
Logo image Logo image

Site Navigation

  • API Reference
  • Examples

Site Navigation

  • API Reference
  • Examples

Section Navigation

  • PyFlink Table
  • PyFlink DataFrame
    • DataFrame
    • DataFrame Creation
    • Input/Output
    • SQL
    • Data Types
    • User Defined Functions
    • Configuration
    • Catalog
    • GPU Support
    • AI / LLM
  • PyFlink Multimodal
  • PyFlink DataStream
  • PyFlink Common

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 in subset are 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"

previous

pyflink.dataframe.DataFrame.fill_null

next

pyflink.dataframe.DataFrame.group_by

Show Source

Created using Sphinx 4.5.0.