-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
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
Improve TypeError message for str.cat #22722
Comments
What are you suggesting exactly? Error message reflects what you would get from a standard Python operation: >>> "".join(['foo', 1])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: sequence item 1: expected str instance, int found |
That's of course correct, but users are not dealing with str/int instances, but usually with Series/ndarray, etc., and so the mentioned warning gives the right hint, but is not necessarily the best we can do. I opened this issue as it was a side product of cleaning up some internals/tests for #22725. |
Currently,
yields
IMO, this should be improved to have a better error message, and shallower stack trace.
The text was updated successfully, but these errors were encountered: