HyukjinKwon commented on code in PR #38327: URL: https://github.com/apache/spark/pull/38327#discussion_r1002841262
########## python/pyspark/sql/connect/dataframe.py: ########## @@ -157,11 +157,44 @@ def coalesce(self, num_partitions: int) -> "DataFrame": def describe(self, cols: List[ColumnRef]) -> Any: ... + def dropDuplicates(self, subset: Optional[List[str]] = None) -> "DataFrame": + """Return a new :class:`DataFrame` with duplicate rows removed, + optionally only deduplicating based on certain columns. + + .. versionadded:: 3.4.0 + + Parameters + ---------- + subset : List of column names, optional + List of columns to use for duplicate comparison (default All columns). + + Returns + ------- + :class:`DataFrame` + DataFrame without duplicated rows. + """ + if subset is None: + return DataFrame.withPlan( + plan.Deduplicate(child=self._plan, all_columns_as_keys=True), session=self._session Review Comment: cc @cloud-fan -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org