xinrong-databricks opened a new pull request, #36444:
URL: https://github.com/apache/spark/pull/36444
### What changes were proposed in this pull request?
Adjust `GroupBy.std` to match pandas 1.4.
### Why are the changes needed?
Improve API compatibility with pandas.
### Does this PR introduce _any_ user-facing change?
Yes.
```py
>>> psdf = ps.DataFrame(
... {
... "A": [1, 2, 1, 2],
... "B": [3.1, 4.1, 4.1, 3.1],
... "C": ["a", "b", "b", "a"],
... "D": [True, False, False, True],
... }
... )
>>> 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
### Before
>>> psdf.groupby('A')[['C']].std()
Empty DataFrame
Columns: []
Index: [1, 2]
### After
>>> psdf.groupby('A')[['C']].std()
...
TypeError: Unaccepted data types of aggregation columns; numeric or bool
expected.
```
### How was this patch tested?
Unit tests.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]