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 2023/04/26 16:07:00 UTC
[jira] [Created] (SPARK-43295) Make DataFrameGroupBy.sum support for string type columns
Haejoon Lee created SPARK-43295:
-----------------------------------
Summary: Make DataFrameGroupBy.sum support for string type columns
Key: SPARK-43295
URL: https://issues.apache.org/jira/browse/SPARK-43295
Project: Spark
Issue Type: Sub-task
Components: Pandas API on Spark
Affects Versions: 3.5.0
Reporter: Haejoon Lee
From pandas 2.0.0, DataFrameGroupBy.sum also works for string type columns:
{code:java}
>>> psdf
A B C D
0 1 3.1 a True
1 2 4.1 b False
2 1 4.1 b False
3 2 3.1 a True
>>> psdf.groupby("A").sum().sort_index()
B D
A
1 7.2 1
2 7.2 1
>>> psdf.to_pandas().groupby("A").sum().sort_index()
B C D
A
1 7.2 ab 1
2 7.2 ba 1 {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