-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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
BUG: maybe_convert_objects
fails for byte series
#49650
Comments
Hi, thanks for your report. This was caused by #49590 cc @jbrockmendel Was this intended? |
no that was not intended |
though i think something may be fishy with dtype="bytes", id expect that to cast to object dtype |
This is part of the wider problem that we sometimes end up with numpy str or bytes dtype and cast in some other cases. Would you be ok with reverting the try/except removal till we can come up with a general solution? |
I'd suggest adding a check in ObjectBlock.convert for |
Just that I understand you: You would cast self.values to object if this check fails? This would not get rid of the problem that we sometimes end up with bytes dtype in the Series constructor |
no. if its self.dtype!=object then there is no need to do inference |
Pandas version checks
Reproducible Example
Issue Description
The nightly version of
maybe_convert_objects
has been throwing an error for byte series for the past couple of days. Not sure if the recent refactoring (#49588) has something to do with it.Expected Behavior
The code runs through and returns the unmodified series with the latest release.
Installed Versions
The text was updated successfully, but these errors were encountered: