You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "xinrong-meng (via GitHub)" <gi...@apache.org> on 2023/02/23 05:38:02 UTC

[GitHub] [spark] xinrong-meng commented on pull request #40135: [SPARK-42444][PYTHON] `DataFrame.drop` should handle multi columns properly

xinrong-meng commented on PR #40135:
URL: https://github.com/apache/spark/pull/40135#issuecomment-1441240940

   Shall we add an example to **Does this PR introduce any user-facing change?** in the PR description? Like
   
   ```py
   >>> df3.show()
   +---+----+------+----+
   |age|name|height|name|
   +---+----+------+----+
   | 16| Bob|    85| Bob|
   | 14| Tom|    80| Tom|
   +---+----+------+----+
   
   ### BEFORE
   >>> df3.drop("name", "age").columns
   Traceback (most recent call last):
   ...
   pyspark.errors.exceptions.captured.AnalysisException: [AMBIGUOUS_REFERENCE] Reference `name` is ambiguous, could be: [`name`, `name`].
   
   ### AFTER
   >>> df3.drop("name", "age").columns
   ['height']
   ```


-- 
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-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org