8000 Fixed Inconsistent GroupBy Output Shape with Duplicate Column Labels by WillAyd · Pull Request #29124 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

Fixed Inconsistent GroupBy Output Shape with Duplicate Column Labels #29124

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 61 commits into from
Nov 20, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
fd53827
Added any_all test
WillAyd Oct 17, 2019
6f60cd0
Added complete test for output shape of elements
WillAyd Oct 17, 2019
0aa1813
Fixed shape issues with bool aggs
WillAyd Oct 17, 2019
4af22f6
Merge remote-tracking branch 'upstream/master' into grpby-dup-cols
WillAyd Oct 21, 2019
9756e74
Added test for transformation shape
WillAyd Oct 21, 2019
b675963
Changed transform output
WillAyd Oct 21, 2019
444d542
Updated test with required args
WillAyd Oct 21, 2019
98a9901
Fixed cummin issue
WillAyd Oct 21, 2019
c8648b1
Fixed ohlc one-off handling
WillAyd Oct 21, 2019
1626de1
Fixed output shape of nunique
WillAyd Oct 21, 2019
2a6b8d7
Fixed tshift
WillAyd Oct 21, 2019
12d1ca0
lint and black
WillAyd Oct 21, 2019
5a3fcd7
Added whatsnew
WillAyd Oct 21, 2019
dee597a
Quantile special case hack
WillAyd Oct 21, 2019
a2f1b64 8000
Merge remote-tracking branch 'upstream/master' into grpby-dup-cols
WillAyd Oct 22, 2019
fdb36f6
Test fix for np dev
WillAyd Oct 22, 2019
8975009
Used position as labels
WillAyd Oct 22, 2019
9adde1b
Code cleanup
WillAyd Oct 22, 2019
63b35f9
docstrings
WillAyd Oct 22, 2019
9eb7c73
style and more typing
WillAyd Oct 22, 2019
0e49bdb
Fixed parallel test collection
WillAyd Oct 22, 2019
2ad7632
numpy dev warning fix
WillAyd Oct 22, 2019
11fda39
More generic ohlc handling
WillAyd Oct 22, 2019
caf8f11
Merge remote-tracking branch 'upstream/master' into grpby-dup-cols
WillAyd Oct 22, 2019
7c4bad9
Converted Dict -> Mapping
WillAyd Oct 22, 2019
b9dca96
doc fixups
WillAyd Oct 22, 2019
a878e67
numpy dev compat
WillAyd Oct 22, 2019
037f9af
Merge remote-tracking branch 'upstream/master' into grpby-dup-cols
WillAyd Oct 22, 2019
dd3b1dc
Merge remote-tracking branch 'upstream/master' into grpby-dup-cols
WillAyd Oct 23, 2019
a66d37f
Renamed index -> idx
WillAyd Oct 23, 2019
6d50448
Removed rogue TODO
WillAyd Oct 23, 2019
4dd8f5b
Added failing test for multiindex
WillAyd Oct 23, 2019
9d39862
MultiIndex support
WillAyd Oct 23, 2019
d6b197b
More exact typing
WillAyd Oct 23, 2019
3cfd1a2
Merge remote-tracking branch 'upstream/master' into grpby-dup-cols
WillAyd Oct 29, 2019
16e9512
jbrockmendel feedback
WillAyd Oct 29, 2019
d297684
Removed failing type
WillAyd Oct 29, 2019
a234bed
Merge remote-tracking branch 'upstream/master' into grpby-dup-cols
WillAyd Oct 31, 2019
e3959b0
Merge remote-tracking branch 'upstream/master' into grpby-dup-cols
WillAyd Nov 2, 2019
391d106
Aligned annotations and comments
WillAyd Nov 2, 2019
c30ca82
Merge remote-tracking branch 'upstream/master' into grpby-dup-cols
WillAyd Nov 6, 2019
3a78051
mypy fix
WillAyd Nov 6, 2019
f4f9e61
Merge remote-tracking branch 'upstream/master' into grpby-dup-cols
WillAyd Nov 7, 2019
936591e
asserts and mypy fixes
WillAyd Nov 7, 2019
5dd131e
Merge remote-tracking branch 'upstream/master' into grpby-dup-cols
WillAyd Nov 13, 2019
6cc1607
Fix issue in merge resolution
WillAyd Nov 13, 2019
d5ce753
Merge remote-tracking branch 'upstream/master' into grpby-dup-cols
WillAyd Nov 17, 2019
ce97eff
Correct merge with 29629
WillAyd Nov 17, 2019
d1a92b4
Fixed issue with dict assignment
WillAyd Nov 17, 2019
23eb803
modernized annotations
WillAyd Nov 17, 2019
4aa9f4c
Merge remote-tracking branch 'upstream/master' into grpby-dup-cols
WillAyd Nov 18, 2019
faa08c9
Merge remote-tracking branch 'upstream/master' into grpby-dup-cols
WillAyd Nov 18, 2019
b07335b
Changed to assert, removed collections
WillAyd Nov 18, 2019
fb71185
Removed breakpoint and whatsnew space
WillAyd Nov 18, 2019
d7b84a2
Fixed issue with DTA
WillAyd Nov 18, 2019
7934422
typing fixup
WillAyd Nov 18, 2019
c8f0b19
Merge remote-tracking branch & 8000 #39;upstream/master' into grpby-dup-cols
WillAyd Nov 19, 2019
acf22d3
packed key into namedtuple
WillAyd Nov 19, 2019
a0aae64
mypy fixes
WillAyd Nov 19, 2019
a9b411a
docstring cleanup
WillAyd Nov 19, 2019
51b8050
Merge remote-tracking branch 'upstream/master' into grpby-dup-cols
WillAyd Nov 19, 2019
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
Removed breakpoint and whatsnew space
  • Loading branch information
WillAyd committed Nov 18, 2019
commit fb711853eeb879c6038bd88fd009ca0596094d14
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v1.0.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ Groupby/resample/rolling
- Bug in :meth:`DataFrameGroupby.agg` not able to use lambda function with named aggregation (:issue:`27519`)
- Bug in :meth:`DataFrame.groupby` losing column name information when grouping by a categorical column (:issue:`28787`)
- Bug in :meth:`DataFrameGroupBy.rolling().quantile()` ignoring ``interpolation`` keyword argument (:issue:`28779`)
- Bug in :meth:`DataFrame.groupby` where ``any``, ``all``, ``nunique`` and transform functions would incorrectly handle duplicate column labels (:issue:`21668`)
- Bug in :meth:`DataFrame.groupby` where ``any``, ``all``, ``nunique`` and transform functions would incorrectly handle duplicate column labels (:issue:`21668`)

Reshaping
^^^^^^^^^
Expand Down
1 change: 0 additions & 1 deletion pandas/core/groupby/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,6 @@ def _cython_agg_general(
else:
assert result.ndim == 1

breakpoint()
if isinstance(result, np.ndarray):
result = result.reshape(-1, 1)
agg_names = [name]
Expand Down
0