-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: Test resampling with NaT #13164
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
Thanks. Can you also add |
@@ -1426,6 +1426,32 @@ def test_to_xarray(self): | |||
expected, | |||
check_index_type=False) | |||
|
|||
def test_resample_with_nat(self): | |||
# GH 13020 | |||
index = pd.DatetimeIndex([pd.NaT, |
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.
move all of these to tests/tseries/test_resample.py
Current coverage is 84.12%@@ master #13164 diff @@
==========================================
Files 138 138
Lines 50388 50380 -8
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
- Hits 42386 42379 -7
+ Misses 8002 8001 -1
Partials 0 0
|
@evectant can you rebase & update |
@sinhrks Those don't seem to be very tolerant to
|
@@ -2839,6 +2839,32 @@ def test_aggregate_with_nat(self): | |||
# if NaT is included, 'var', 'std', 'mean', 'first','last' | |||
# and 'nth' doesn't work yet | |||
|
|||
def test_resample_with_nat(self): |
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.
if you move these to Base
and use .create_series()
you will get testing for free for all of the sub-classes (DTI, PeriodIndex, TimedeltaIndex)
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.
Would it be helpful here? All three index types seem to handle NaT
differently (see examples above).
@sinhrks @jreback I think there are three different issues here:
So can this one be merged and #13020 closed? |
thanks @evectant merged. when you work on the other too resample-with-nat issues, ideally we move this test to |
test_generic.py:TestDataFrame.test_resample_with_nat