distinct

Edit page Last modified: 14 January 2025

Removes duplicate rows. The rows in the resulting DataFrame are in the same order as they were in the original DataFrame.

If columns are specified, resulting DataFrame will have only given columns with distinct values.

df.distinct { age and name }
// same as
df.select { age and name }.distinct()