Skip to content

BUG: to_datetime fails with np.datetime64 and non-ISO format #50038

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

Merged
merged 1 commit into from
Dec 4, 2022

Conversation

MarcoGorelli
Copy link
Member

@MarcoGorelli MarcoGorelli force-pushed the parse-np-datetime64 branch 2 times, most recently from 4b76fef to aa3ad3b Compare December 3, 2022 12:44
Comment on lines +176 to +178
elif is_datetime64_object(val):
iresult[i] = get_datetime64_nanos(val, NPY_FR_ns)
continue
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll planning to do more code sharing between the ISO and non-ISO paths, but for now this is a minimal fix

@MarcoGorelli MarcoGorelli added the Datetime Datetime data dtype label Dec 3, 2022
Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@MarcoGorelli MarcoGorelli added this to the 2.0 milestone Dec 4, 2022
@MarcoGorelli MarcoGorelli merged commit 74f1e94 into pandas-dev:main Dec 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Datetime Datetime data dtype
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: to_datetime fails with np.datetime64 and non-ISO format
2 participants