8000 BUG: groupby.agg/transform casts UDF results by rhshadrach · Pull Request #40790 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

BUG: groupby.agg/transform casts UDF results #40790

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
May 3, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
477d813
BUG: groupby.agg/transform downcasts UDF results
rhshadrach Apr 2, 2021
d932c93
Merge branch 'master' of https://github.com/pandas-dev/pandas into do…
rhshadrach Apr 10, 2021
f2069a7
Reverted behavior change when input and output are the same kind
rhshadrach Apr 10, 2021
35c789f
Patch via maybe_convert_objects
rhshadrach Apr 10, 2021
93fa089
Merge branch 'master' of https://github.com/pandas-dev/pandas into do…
rhshadrach Apr 22, 2021
1cb216e
fixups
rhshadrach Apr 22, 2021
0cafcee
whatsnew
rhshadrach Apr 22, 2021
785ac9d
dtype test fixes
rhshadrach Apr 23, 2021
737a366
Merge branch 'master' of https://github.com/pandas-dev/pandas into do…
rhshadrach Apr 23, 2021
0b00aa7
Merge branch 'master' of https://github.com/pandas-dev/pandas into do…
rhshadrach Apr 24, 2021
de0f7b5
fixup
rhshadrach Apr 24, 2021
e95bb49
Merge branch 'dont_cast_udfs' of https://github.com/rhshadrach/pandas…
rhshadrach Apr 24, 2021
4ef6794
Fixup
rhshadrach Apr 24, 2021
4f97288
Add GH issue to TODOs
rhshadrach Apr 24, 2021
8000
ad7d990
Added docs to user guide, agg docstring
rhshadrach Apr 25, 2021
11529e3
Updated docs
rhshadrach Apr 25, 2021
0ca49f6
Merge branch 'dont_cast_udfs' of https://github.com/rhshadrach/pandas…
rhshadrach Apr 25, 2021
a0a2640
Fixup
rhshadrach Apr 27, 2021
eb1943a
Fixup
rhshadrach Apr 27, 2021
180bc23
docsting fixup
rhshadrach Apr 29, 2021
47d97ae
Merge branch 'master' of https://github.com/pandas-dev/pandas into do…
rhshadrach Apr 29, 2021
4a0978e
Add versionchanged
rhshadrach May 1, 2021
2b38e5c
Merge branch 'master' of https://github.com/pandas-dev/pandas into do…
rhshadrach May 1, 2021
6b80c10
Added versionchanged
rhshadrach May 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add versionchanged
  • Loading branch information
rhshadrach committed May 1, 2021
commit 4a0978ed921729adb7e83ef57e8aa7f497997ea2
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v1.3.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ values as measured by ``np.allclose``. Now no such casting occurs.

.. ipython:: python

In [5]: df.groupby('key').agg(lambda x: x.sum())
df.groupby('key').agg(lambda x: x.sum())

Try operating inplace when setting values with ``loc`` and ``iloc``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
5 changes: 3 additions & 2 deletions pandas/core/groupby/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,9 @@ class providing the base-class of operations.
side-effects, as they will take effect twice for the first
group.

The resulting dtype will reflect the return value of the passed ``func``,
see the examples below.
.. versionchanged:: 1.2.0
The resulting dtype will reflect the return value of the passed ``func``,
see the examples below.

Examples
--------
Expand Down
0