-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: Unexpected behaviour when inserting timestamps into Series #57596
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
Comments
take |
This is a tough one. The '2024-02-24 10:08' case goes through the |
Correct me if I'm wrong, from what I understand, the |
Changing this within DTI.get_loc doesn't make sense; you'd need to catch it elsewhere |
Just wondering if catching it in |
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
When inserting timestamps into a pandas Series, beginning with the format 'yyyy-mm-dd hh:mm', they are inserted correctly, until first time switching to format 'yyyy-mm-dd hh:mm:ss'. From then on format 'yyyy-mm-dd hh:mm' is silently not inserted, ending with seconds required.
Not sure if this is intended, unexpected behaviour in my opinion.
Expected Behavior
Insert timestamps as long as their format is parsed unambiguously.
Installed Versions
The text was updated successfully, but these errors were encountered: