Skip to main content
Ctrl+K
PyFlink 1.20+vvr.11.7.dev0 documentation - Home PyFlink 1.20+vvr.11.7.dev0 documentation - Home
  • API Reference
  • Examples
  • API Reference
  • Examples

Section Navigation

  • PyFlink Table
  • PyFlink DataStream
  • PyFlink DataFrame
    • DataFrame
    • DataFrame Creation
    • Input/Output
    • SQL
    • DataType
    • User Defined Functions
    • Configuration
    • GPU Support
    • AI / LLM
  • PyFlink Common
  • API Reference
  • PyFlink DataFrame
  • DataFrame
  • pyflink.dataframe.dataframe.DataFrame.fill_nan

pyflink.dataframe.dataframe.DataFrame.fill_nan#

DataFrame.fill_nan(value: Any, subset: List[str] | None = None) → 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.DataFrame.fill_null

next

pyflink.dataframe.dataframe.DataFrame.llm

On this page
  • DataFrame.fill_nan()

This Page

  • Show Source

Created using Sphinx 7.4.7.

Built with the PyData Sphinx Theme 0.16.1.