You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Ruifeng Zheng (Jira)" <ji...@apache.org> on 2023/02/07 06:20:00 UTC
[jira] [Created] (SPARK-42367) DataFrame.drop could handle duplicated columns
Ruifeng Zheng created SPARK-42367:
-------------------------------------
Summary: DataFrame.drop could handle duplicated columns
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
{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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org