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

Groupby object does not allow subscripting unlike pandas #549

Open
sherwin684 opened this issue Jun 19, 2023 · 0 comments
Open

Groupby object does not allow subscripting unlike pandas #549

sherwin684 opened this issue Jun 19, 2023 · 0 comments

Comments

@sherwin684
Copy link

Description
Encountered an error when trying to access a column in an eland DataFrame using the groupby() method.

grouped_data = df.groupby('feature')['used']

Expected object
pandas.core.frame.DataFrame

Actual behaviour
Throws TypeError
`---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_20028\2953508713.py in
1 #feature_max = df.groupby('feature')['used'].agg(['min', 'max'])
2 #print(feature_max)
----> 3 grouped_data = df.groupby('feature')['used'].agg(max_value='max')

TypeError: 'DataFrameGroupBy' object is not subscriptable`

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

No branches or pull requests

1 participant