-
-
Notifications
You must be signed in to change notification settings - Fork 133
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
GH1074 Add type hint Series[list[str]] for Series.str.split with expand=False #1075
Conversation
- fix Index.str.split method return wrong result; - add test for Index.str.split method with expand=False; - return changes performed in pull request pandas-dev#1029.
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.
Have to admit I was surprised this passed CI as is. Have some other changes to make, but it is looking pretty good.
Co-authored-by: Irv Lustig <irv@princeton.com>
Co-authored-by: Irv Lustig <irv@princeton.com>
Co-authored-by: Irv Lustig <irv@princeton.com>
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.
Almost there. I noticed that you should do rsplit()
as well for completeness
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.
Thanks @pan-vlados
assert_type()
to assert the type of any return valueThis pull request affect on the issue #571 fixed in pull request #1029.
Drawback is that the next code will be interpreted as type
Series[str]
(notSeries[Any]
):