You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering: When looking at the overload variants of groupby_transform in the more.pyi module, the return type annotation is sometimes Iterator, sometimes Iterable. Whereas, judging by the implementation it should always be an Iterator.
The return type annotation is Iterable whenever at least one of the arguments value_func or reduce_func is not None. I.e. the actual return type will then be a generator expression instead of the raw result of groupby (by the implementation). But generator expressions are also Iterators not only Iterables.
So this is more of a question, is there any reason to annotate it as Iterable instead?