-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
recursion limit reached when joining period and datetimeindexes #3899
Comments
cc #3900 |
@jreback should joins be allowed here (resulting in an object index)? alternative is to raise a type error disallowing joins between period and datetime indices. more generally, to revisit the issue about datetimeindex joins, should anything besides "date-able" strings and integers be allowed to join, the result being an object index if they were, otherwise raise a typeerror...i think this particular bug might be easy to fix if we choose to raise, but legacy support will most likely be broken since the latter would be more strict with allowed joins... |
u can convert period to datetime (and vice versa) though still fuzzy when/if this is useful |
i don't think it is that useful and maybe this bug is even a bit academic, lmk if u think this not worth fixing. these kinds of bugs are notoriously difficult because the code path to the cycle has the potential to be enormous. thankfully, i just discovered the cycle, and it's not that long. i believe the problem is that object datetime indices are not being converted to datetime indices and thus another way to see it is that periodindexes should be kept as object here and thus the dtypes will test equal on the next recursive call and the code will terminate. either way if the dtypes are not equal the code attempts conversion to object but the |
that's why it might make sense to only allow certain types of joins (and conversions) |
okay...also this bug hidden by the "fake" unicode error that i submitted a pr for last night. later today i'll put up a table with what i think makes sense for conversions and would be nice if u could suggest additions/deletions...then will fix it according to that. thanks |
i think implementing this |
@jreback so one solution that i have working is to convert period/datetime indices to the other depending on which is doing the join. the obvs prb here is all period can convert to datetime where as not all datetime can cvt to period. possible solutions:
or
|
i think 1) is the best option since it seems weird to have the periodindex join method return a datetimeindex even if the other is a datetimeindex. i think it should raise if the datetimeindex can't be converted to a periodindex and of course convert if it can |
let push to 0.12 |
what are we doing with this? punt/push? |
i'll fix by 0.13 |
just need to clarify what the exact issue is |
as in write it down here so that we can discuss it |
why don't we just raise for now? and then let's figure out in 0.14 (if it should even be allowed) |
pr in the works |
entire problem was that |
one should probably not be trying to join these types of indices. even so, a stack overflow is unacceptable. there should at least be an error message...
code:
The text was updated successfully, but these errors were encountered: