dominikgehl commented on a change in pull request #33364:
URL: https://github.com/apache/spark/pull/33364#discussion_r670360756



##########
File path: python/pyspark/sql/dataframe.py
##########
@@ -1982,6 +1982,8 @@ def dropDuplicates(self, subset=None):
         """
         if subset is None:
             jdf = self._jdf.dropDuplicates()
+        elif not isinstance(subset, list):
+            raise TypeError("Parameter 'subset' must be a list of columns")

Review comment:
       wouldn't it be better to use something like what we have in dropna ?
   i.e.
   ```
           elif isinstance(subset, str):
               subset = [subset]
           elif not isinstance(subset, (list, tuple)):
               raise TypeError("subset should be a list or tuple of column 
names")
   ```




-- 
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