Skip to content

Resampling with NaT in TimedeltaIndex raises MemoryError #13223

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

Closed
evectant opened this issue May 18, 2016 · 1 comment · Fixed by #22253
Closed

Resampling with NaT in TimedeltaIndex raises MemoryError #13223

evectant opened this issue May 18, 2016 · 1 comment · Fixed by #22253
Labels
Bug Resample resample method Timedelta Timedelta data type
Milestone

Comments

@evectant
Copy link
Contributor

DatetimeIndex can handle NaT:

In [2]: dti = pd.DatetimeIndex(['1970-01-01 00:00:00', pd.NaT, '1970-01-01 00:00:02'])

In [3]: pd.DataFrame([2, 3, 5], dti).resample('1s').mean()
Out[3]: 
                       0
1970-01-01 00:00:00  2.0
1970-01-01 00:00:01  NaN
1970-01-01 00:00:02  5.0

But TimedeltaIndex can't:

In [4]: tdi = pd.to_timedelta(['0s', pd.NaT, '2s'])

In [5]: pd.DataFrame([2, 3, 5], tdi).resample('1s').mean()
...
MemoryError:

Versions:

python: 2.7.11.final.0
OS: Linux
machine: x86_64
pandas: 0.18.1+38.gc7e6f5f.dirty
numpy: 1.10.2
@jreback jreback added Bug Timedelta Timedelta data type Resample resample method Difficulty Intermediate labels May 18, 2016
@jreback jreback added this to the 0.18.2 milestone May 18, 2016
@jreback
Copy link
Contributor

jreback commented May 18, 2016

hmm, that's not too friendly.

@jreback jreback modified the milestones: 0.19.0, 0.19.1 Sep 28, 2016
@jorisvandenbossche jorisvandenbossche modified the milestones: 0.20.0, 0.19.1 Oct 29, 2016
paulgliu added a commit to paulgliu/pandas that referenced this issue Nov 14, 2016
paulgliu added a commit to paulgliu/pandas that referenced this issue Nov 17, 2016
paulgliu added a commit to paulgliu/pandas that referenced this issue Jan 2, 2017
paulgliu added a commit to paulgliu/pandas that referenced this issue Jan 2, 2017
paulgliu added a commit to paulgliu/pandas that referenced this issue Feb 1, 2017
paulgliu added a commit to paulgliu/pandas that referenced this issue Feb 1, 2017
paulgliu added a commit to paulgliu/pandas that referenced this issue Feb 1, 2017
paulgliu added a commit to paulgliu/pandas that referenced this issue Feb 1, 2017
@jreback jreback modified the milestones: 0.20.0, Next Major Release Mar 23, 2017
paulgliu added a commit to paulgliu/pandas that referenced this issue Apr 7, 2017
paulgliu added a commit to paulgliu/pandas that referenced this issue Apr 7, 2017
@jreback jreback modified the milestones: Contributions Welcome, 0.23.5 Aug 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Resample resample method Timedelta Timedelta data type
Projects
None yet
3 participants