Skip to content
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

Named aggregation doesn't work with Series objects #2405

Closed
gshimansky opened this issue Nov 13, 2020 · 1 comment · Fixed by #6892
Closed

Named aggregation doesn't work with Series objects #2405

gshimansky opened this issue Nov 13, 2020 · 1 comment · Fixed by #6892
Labels
bug 🦗 Something isn't working P2 Minor bugs or low-priority feature requests pandas concordance 🐼 Functionality that does not match pandas

Comments

@gshimansky
Copy link
Collaborator

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04):

Ubuntu 20.04

  • Modin version (modin.__version__):

0.8.2.1+6.g2b0b755

  • Python version:

Python 3.7.8

  • Code we can use to reproduce:
import modin.pandas as pd

s1 = pd.Series([10, 10, 10, 1, 1, 1, 2, 3])
s1.name = "data"

print(s1)
print(type(s1))
gb = s1.groupby(level=0)
print(gb.groups)
s2 = gb.agg(result=("max"))
print(s2)
print(type(s2))

Describe the problem

On Modin this code throws exception from Pandas reconstruct_func because it doesn't accept such arguments.

Traceback (most recent call last):
  File "groupby_test24.py", line 10, in <module>
    s2 = gb.agg(result=("max"))
  File "/localdisk/gashiman/modin/modin/pandas/groupby.py", line 376, in aggregate
    func, **kwargs
  File "/localdisk/gashiman/modin/modin/pandas/groupby.py", line 364, in _reconstruct_func
    func, **kwargs
  File "/localdisk/gashiman/miniconda3/envs/modin_on_omnisci/lib/python3.7/site-packages/pandas/core/aggregation.py", line 86, in reconstruct_func
    raise TypeError("Must provide 'func' or tuples of '(column, aggfunc).")
TypeError: Must provide 'func' or tuples of '(column, aggfunc).
@gshimansky gshimansky added the bug 🦗 Something isn't working label Nov 13, 2020
@pyrito
Copy link
Collaborator

pyrito commented Aug 22, 2022

I am able to reproduce this bug on the latest master.

@pyrito pyrito added pandas concordance 🐼 Functionality that does not match pandas P2 Minor bugs or low-priority feature requests labels Aug 22, 2022
anmyachev added a commit to anmyachev/modin that referenced this issue Jan 26, 2024
…bjects

Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
anmyachev added a commit to anmyachev/modin that referenced this issue Jan 29, 2024
…bjects

Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
YarShev added a commit that referenced this issue Jan 30, 2024
Co-authored-by: Iaroslav Igoshev <Poolliver868@mail.ru>
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🦗 Something isn't working P2 Minor bugs or low-priority feature requests pandas concordance 🐼 Functionality that does not match pandas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants