[ 
https://issues.apache.org/jira/browse/SPARK-42367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17688434#comment-17688434
 ] 

Apache Spark commented on SPARK-42367:
--------------------------------------

User 'zhengruifeng' has created a pull request for this issue:
https://github.com/apache/spark/pull/40013

> DataFrame.drop should handle duplicated columns properly
> --------------------------------------------------------
>
>                 Key: SPARK-42367
>                 URL: https://issues.apache.org/jira/browse/SPARK-42367
>             Project: Spark
>          Issue Type: Sub-task
>          Components: Connect, PySpark
>    Affects Versions: 3.4.0
>            Reporter: Ruifeng Zheng
>            Priority: Major
>
> {code:java}
> >>> df.join(df2, df.name == df2.name, 'inner').show()
> +---+----+------+----+
> |age|name|height|name|
> +---+----+------+----+
> | 16| Bob|    85| Bob|
> | 14| Tom|    80| Tom|
> +---+----+------+----+
> >>> df.join(df2, df.name == df2.name, 'inner').drop('name').show()
> +---+------+
> |age|height|
> +---+------+
> | 16|    85|
> | 14|    80|
> +---+------+
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to