-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
FIX: add additional condition to check invalid type(#28277) #28319
Conversation
Hello @boomsquared! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2019-09-06 19:31:31 UTC |
Thanks for the PR! Can you add a test for the behavior you are trying to solve? Tests are typically the most critical part of any PR |
@WillAyd Thanks for the advice, will certainly do. |
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 again for the PR! Great investigation into root cause. I'm not sure about the proposed fixed just yet but cc @TomAugspurger if he has thoughts as well
Can you also add a whatsnew note for v1.0.0?
@@ -2107,7 +2107,9 @@ def _get_series_list(self, others): | |||
elif isinstance(others, np.ndarray) and others.ndim == 2: | |||
others = DataFrame(others, index=idx) | |||
return [others[x] for x in others] | |||
elif is_list_like(others, allow_sets=False): | |||
elif is_list_like(others, allow_sets=False) and not isinstance( |
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.
Not sure about this. I think the real issue is that is_list_like
returns True for s.str
when it shouldn't, though I do see that is also technically Iterable so maybe this should be allowed and just fixed
Hmm that's very surprising. Seems like it yields "columnar character by character" access across all elements? Maybe we should just deprecate that behavior then? Having a hard time seeing where that is useful as an iterator |
@WillAyd The |
I think the best approach would be to deprecate the |
@WillAyd Is there something more to depreciating the function than just removing it from the code? |
Yea we would want to throw a warning for the time being and add some doc notes / sphinx directives for the deprecation. There's a Deprecate label where you can see past PRs, but citing a specific example I think #26744 is one PR that's relatively clean to emulate |
series.str.cat(series.str)
is concatenating only the largest string #28277black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff