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

Select aggregation functions based on column types #28

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

terror
Copy link
Member

@terror terror commented Nov 6, 2024

Resolves #26

Putting this up for visibility. This MR allows us to generate groupby + aggregations of the form:

.groupby(by=['S_SUPPKEY', 'PS_PARTKEY', 'BRAND', 'N_REGIONKEY', 'PS_SUPPKEY']).agg({'S_NATIONKEY': 'last', 'R_REGIONKEY': 'min'})

...where the aggregation function is compatible with the column type.

There's an issue however where pd.eval throws this error when executing queries of this type:

NotImplementedError: 'Dict' nodes are not implemented

Need to find a way around this in order to get this in.

@terror terror force-pushed the master branch 3 times, most recently from 34b6967 to 3ed57f3 Compare November 27, 2024 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Select aggregation functions based on column types
1 participant