-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Resampling with NaT in TimedeltaIndex raises MemoryError #22253
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
doc/source/whatsnew/v0.24.0.txt
Outdated
@@ -648,7 +648,7 @@ Groupby/Resample/Rolling | |||
``SeriesGroupBy`` when the grouping variable only contains NaNs and numpy version < 1.13 (:issue:`21956`). | |||
- Multiple bugs in :func:`pandas.core.Rolling.min` with ``closed='left'` and a | |||
datetime-like index leading to incorrect results and also segfault. (:issue:`21704`) | |||
- | |||
- Bug in :meth:`DataFrame.resample` when resampling NaT in `TimeDeltaIndex` (:issue:`13223`). |
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.
use double-backticks on NaT
and on TDI
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.
I would take this in 0.23.5
pandas/tests/test_resample.py
Outdated
@@ -2887,6 +2887,16 @@ def test_asfreq_bug(self): | |||
freq='1T')) | |||
assert_frame_equal(result, expected) | |||
|
|||
def test_resampling_with_nat(self): | |||
# GH 13223 |
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.
can you see if you move this to Base, so it runs on DTI, Period, and DTI (use self.create_series() then add a NaT).
alternatively you can just write separate tests for DTI and Period (we may have for DTI already), pls indicate if so.
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.
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.
k thanks, if you are interested in consolidating these into Base (new PR) would be great (if its easy)
Codecov Report
@@ Coverage Diff @@
## master #22253 +/- ##
==========================================
- Coverage 92.07% 92.07% -0.01%
==========================================
Files 169 169
Lines 50684 50682 -2
==========================================
- Hits 46668 46666 -2
Misses 4016 4016
Continue to review full report at Codecov.
|
git diff upstream/master -u -- "*.py" | flake8 --diff