Skip to content
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

Resampling with NaT in TimedeltaIndex raises MemoryError #13223

Closed
evectant opened this issue May 18, 2016 · 1 comment

Comments

Projects
None yet
3 participants
@evectant
Copy link
Contributor

commented May 18, 2016

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

This comment has been minimized.

Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.