-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: do not convert mixed-integer type indexes to datetimeindex #3878
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
ENH: do not convert mixed-integer type indexes to datetimeindex #3878
Conversation
@jreback any thoughts/opinions here? i'm not sure if i really want this because of |
hmm....maybe this should be changed a bit to only allow certain types of indicies on a time-series join. e.g. string, integer (only if time-series convertible) I would raise I think if inferred_type != object or the TypeError is triggered of course see what this breaks |
one problem with the second point is that i believe all integers except for reserved ones like |
sweet only breaks 4 tests 2 of which are trying to convert, easy enough to change, need to look at others |
@jreback legacy support is broken if you raise and only allow strings to be converted. currently it's really only an issue with converting mixed-integer type indexes. unless one of the goals is to raise whenever an object index is being used...thus discouraging users from using it. my change here preserves legacy support and fixes the issue of conversion i can do the raise if u want but is it too soon for htat? |
that's fine then |
i agree that it's annoying to have to special case this but the int<->datetime mapping makes it necessary when u already have an object index :( |
@jreback anything else u think i should add here? if not should i merge? |
go ahead |
ENH: do not convert mixed-integer type indexes to datetimeindex
@jreback u were right after all, all these issues are related to this .... |
the fix or the symtom? |
symptom |
closes #3877.