pyspark.sql.DataFrameNaFunctions

class pyspark.sql.DataFrameNaFunctions(df: pyspark.sql.dataframe.DataFrame)[source]

Functionality for working with missing data in DataFrame.

New in version 1.4.0.

Changed in version 3.4.0: Supports Spark Connect.

Methods

drop([how, thresh, subset])

Returns a new DataFrame omitting rows with null values.

fill(value[, subset])

Replace null values, alias for na.fill().

replace(to_replace[, value, subset])

Returns a new DataFrame replacing a value with another value.