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

DatetimeIndexes with day frequency hang when they have more than 2 elements #3612

Closed
cpcloud opened this issue May 15, 2013 · 14 comments
Closed
Assignees
Labels
Bug Datetime Datetime data dtype Dtype Conversions Unexpected or buggy dtype conversions Frequency DateOffsets
Milestone

Comments

@cpcloud
Copy link
Member

cpcloud commented May 15, 2013

See #3609. Copied (more or less) from there

dind = period_range('1/1/2001', '1/1/2002').to_timestamp()
s = Series(randn(dind.size), dind)
s.resample('T', kind='period')  # hangs here

Doesn't hang (throws an error) for the simple case of

dind = period_range('1/1/2001', '1/2/2001').to_timestamp()
s = Series(randn(dind.size), dind)
s.resample('T', kind='period')

and starts to hang for dind.size > 2.

@ghost ghost assigned cpcloud Jun 11, 2013
@cpcloud
Copy link
Member Author

cpcloud commented Jun 18, 2013

problem is an object conversion of a 526000-ish size array. large PeriodIndexes have a very slow astype method due to iterating over each element in python...might help to cythonize but not sure how common this is. in any case should probably raise or cythonize

@jreback
Copy link
Contributor

jreback commented Sep 27, 2013

@cpcloud I think should do this for 0.13. I can do if you don't want.

@jreback
Copy link
Contributor

jreback commented Sep 27, 2013

k gr8

@jreback
Copy link
Contributor

jreback commented Oct 3, 2013

hows this coming?

@cpcloud
Copy link
Member Author

cpcloud commented Oct 3, 2013

pr will close #3899

@jreback
Copy link
Contributor

jreback commented Oct 3, 2013

gr8

@cpcloud
Copy link
Member Author

cpcloud commented Oct 4, 2013

@jreback i was slightly mistaken ... this ended up being unrelated to #3899 ... i'll still fix this one tho

@cpcloud
Copy link
Member Author

cpcloud commented Oct 4, 2013

related #1688

@cpcloud
Copy link
Member Author

cpcloud commented Oct 9, 2013

@jreback what do u want to do here? the hanging is caused by construction of a giant period index....not really much there except move the construction down into cython...should i do that? or just close as won't fix

@jreback
Copy link
Contributor

jreback commented Oct 9, 2013

you mean like this issue: #5155 (ffor constructing giant periodindex is broken but easily fixed)

but isn't this issue different?

@cpcloud
Copy link
Member Author

cpcloud commented Oct 9, 2013

no that's the same issue

@cpcloud
Copy link
Member Author

cpcloud commented Oct 9, 2013

it's not that more than two elements causes it it's that the construction of a huge period index (bc going from years to minutes) makes it seems as if it's hanging

@cpcloud
Copy link
Member Author

cpcloud commented Oct 9, 2013

closing in favor of #5155

@cpcloud cpcloud closed this as completed Oct 9, 2013
@jreback
Copy link
Contributor

jreback commented Oct 9, 2013

ahh...ok...makes sense

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Datetime Datetime data dtype Dtype Conversions Unexpected or buggy dtype conversions Frequency DateOffsets
Projects
None yet
Development

No branches or pull requests

2 participants