-
-
Notifications
You must be signed in to change notification settings - Fork 145
Closed
Description
Describe the bug
When accessing a column on a DataFrameGroupBy object via attribute-access (see below), mypy complains that no such attribute exists.
To Reproduce
- Provide a minimal runnable
pandas
example that is not properly checked by the stubs. - Indicate which type checker you are using (
mypy
orpyright
). - Show the error message received from that type checker while checking your example.
df = pd.DataFrame({'a': [1, 1, 2], 'b': [3, 4, 5]})
gb = df.groupby('a').b
mypy 0.991 says: "_DataFrameGroupByNonScalar" has no attribute "b"