-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TYP/cln: generic._make_*_function #32363
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
TYP/cln: generic._make_*_function #32363
Conversation
name2: str, | ||
axis_descr: str, | ||
desc: str, | ||
func: Callable, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to add subtypes here or no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The passed functions don't have the same signature, because e.g. nansum
has a min_count
parameter and nankurt
does not. So it's not possible without splitting the function into two, which IMO is not worth it.
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor comment otherwise lgtm
pandas/core/generic.py
Outdated
accum_func: Callable, | ||
accum_func_name: str, | ||
mask_a: Union[float, np.floating], | ||
mask_b: Union[float, np.floating], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mask_b: Union[float, np.floating], | |
mask_b: float, |
e120260
to
0c3db7f
Compare
Give calls to these funcs named parameters for better clarity + type up the make_stats functions.