We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug SeriesGroupBy.transform and DataFrameGroupBy.transform are currently not typed:
SeriesGroupBy.transform
DataFrameGroupBy.transform
pandas-stubs/pandas-stubs/core/groupby/generic.pyi
Line 159 in 001c0af
Running mypy with --disallow-untyped-calls reports an issue with any usage of this method.
--disallow-untyped-calls
The text was updated successfully, but these errors were encountered:
Need to return Series for SeriesGroupBy.transform and DataFrame for DataFrameGroupBy.transform.
Series
DataFrame
PR with tests welcome
Sorry, something went wrong.
Do we not have to change the arguments of transform? will it work if we just add the return types
For now, you could just annotate f as Callable and don't worry about *args and **kwargs, and then add the return types.
f
Callable
*args
**kwargs
For now, you could just annotate f as Callable
I would do str | Callable; using a string alias is a very common use case (at least for me). Looks like the docs need updating in this regard.
str | Callable
Successfully merging a pull request may close this issue.
Describe the bug
SeriesGroupBy.transform
andDataFrameGroupBy.transform
are currently not typed:pandas-stubs/pandas-stubs/core/groupby/generic.pyi
Line 159 in 001c0af
Running mypy with
--disallow-untyped-calls
reports an issue with any usage of this method.The text was updated successfully, but these errors were encountered: