Skip to contents

Returns a new SparkDataFrame with duplicate rows removed, considering only the subset of columns.

Usage

dropDuplicates(x, ...)

# S4 method for SparkDataFrame
dropDuplicates(x, ...)

Arguments

x

A SparkDataFrame.

...

A character vector of column names or string column names. If the first argument contains a character vector, the followings are ignored.

Value

A SparkDataFrame with duplicate rows removed.

Note

dropDuplicates since 2.0.0

Examples

if (FALSE) {
sparkR.session()
path <- "path/to/file.json"
df <- read.json(path)
dropDuplicates(df)
dropDuplicates(df, "col1", "col2")
dropDuplicates(df, c("col1", "col2"))
}