xinrong-databricks opened a new pull request #35782:
URL: https://github.com/apache/spark/pull/35782


   ### What changes were proposed in this pull request?
   Add `Series.duplicated` to indicate duplicate Series values.
   
   
   ### Why are the changes needed?
   To reach parity with pandas API.
   
   
   ### Does this PR introduce _any_ user-facing change?
   Yes, `Series.duplicated` is supported now.
   ```py
           >>> animals = ps.Series(['lama', 'cow', 'lama', 'beetle', 'lama'])
           >>> animals.duplicated().sort_index()
           0    False
           1    False
           2     True
           3    False
           4     True
           dtype: bool
   
           >>> animals.duplicated(keep='last').sort_index()
           0     True
           1    False
           2     True
           3    False
           4    False
           dtype: bool
   
           >>> animals.duplicated(keep=False).sort_index()
           0     True
           1    False
           2     True
           3    False
           4     True
           dtype: bool
   ```
   
   ### How was this patch tested?
   Unit tests.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to