You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2025/08/12 21:38:00 UTC
[jira] [Updated] (SPARK-53050) MultiIndex.to_series() should return tuples for each entry
[ https://issues.apache.org/jira/browse/SPARK-53050?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated SPARK-53050:
-----------------------------------
Labels: pull-request-available (was: )
> MultiIndex.to_series() should return tuples for each entry
> ----------------------------------------------------------
>
> Key: SPARK-53050
> URL: https://issues.apache.org/jira/browse/SPARK-53050
> Project: Spark
> Issue Type: Sub-task
> Components: PS
> Affects Versions: 4.1.0
> Reporter: Xinrong Meng
> Priority: Major
> Labels: pull-request-available
>
> MultiIndex.to_series() in pandas-on-Spark returns lists for each entry, whereas pandas returns tuples.
> {code:python}
> >>> arrays = [[1, 2], ["red", "blue"]]
> >>> pidx = pd.MultiIndex.from_arrays(arrays, names=("number", "color"))
> >>> psidx = ps.from_pandas(pidx)
> >>> pidx.to_series()
> number color
> 1 red (1, red)
> 2 blue (2, blue)
> dtype: object
> >>> psidx.to_series()
> number color
> 1 red [1, red]
> 2 blue [2, blue]
> dtype: object
> {code}
> that applies for both ANSI on and off
--
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