pyspark.sql.DataFrameNaFunctions#

class pyspark.sql.DataFrameNaFunctions(df)[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])

Returns a new DataFrame which null values are filled with new value.

replace(to_replace[, value, subset])

Returns a new DataFrame replacing a value with another value.