-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
TST: Test datetime array assignment with different units (#7492) #14884
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
Conversation
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.
Nice!
# OutOfBoundsDatetime error shouldn't occur | ||
data_s = np.array([1, 'nat'], dtype='datetime64[s]') | ||
result['new'] = data_s | ||
expected = pd.DataFrame({0: data_ns, 'new': data_s}) |
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.
Probably not needed to assert the original bug, but I would create the expected frame independently of data_s
(eg pd.DataFrame({0:[1e9, None], 'new': [1e9, None]}, dtype='datetime64[ns]')
)
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.
Thanks for the guidance! I'll make that change later tonight.
Current coverage is 85.30% (diff: 100%)
|
Changes made and all green. |
@mroeschke Thanks! |
git diff upstream/master | flake8 --diff
The example in this issue currently works in master. Added a test to confirm. Based on a quick skim of the recent PRs, doesn't look like it was fixed recently.