You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Haejoon Lee (Jira)" <ji...@apache.org> on 2021/12/23 07:04:00 UTC
[jira] [Created] (SPARK-37723) Support tuple for non-MultiIndex column name.
Haejoon Lee created SPARK-37723:
-----------------------------------
Summary: Support tuple for non-MultiIndex column name.
Key: SPARK-37723
URL: https://issues.apache.org/jira/browse/SPARK-37723
Project: Spark
Issue Type: Improvement
Components: PySpark
Affects Versions: 3.3.0
Reporter: Haejoon Lee
pandas API on Spark doesn't support tuple as column name for non-MultiIndex column.
>>> psdf = ps.DataFrame(\{"A": [1, 2, 3]})
>>> psdf
A
0 1
1 2
2 3
>>> psdf[('a', 'b')] = [4, 5, 6]
Traceback (most recent call last):
...
KeyError: 'Key length (2) exceeds index depth (1)'
As pandas support this, we should follow the behavior.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org