DataFrame.
distinct
Returns a new DataFrame containing the distinct rows in this DataFrame.
DataFrame
>>> df.distinct().count() 2
New in version 1.3.