-
-
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
BUG: to_datetime with mixed-string-and-numeric #55780
Conversation
# do 2-step | ||
ts = Timestamp(item).tz_convert(tz) | ||
else: | ||
ts = Timestamp(item, tz=tz) |
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.
Nit: Should we use tz_localize
here to be more explicit?
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.
the point is to match the behavior of calling the constructor this way, so i prefer this.
But now that #55712 is merged we can replace all of this with convert_to_tsobject
which will move the ball down the field on a bunch of fronts. will update
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.
looks like moving to convert_to_tsobject introduces its own set of issues, so ill do that in a separate PR
Thanks @jbrockmendel |
@jbrockmendel mind taking a look at this test failure on main? This PR might have been responsible https://github.com/pandas-dev/pandas/actions/runs/6728530133/job/18288031590 |
will do |
Reverting this doesn't seem to fix the problem, but it definitely seems connected to what ive been doing the last few days. i'll keep trying to track this down |
Thanks! |
i dont think a measured-in-minutes fix is forthcoming. might need to xfail or comment-out that offending line |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.Surfaced while implementing #55564