-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
API: type conversions on merges #15332
Comments
In the integer case, what would be the rule? As I would actually expect it to be floats, not ints (or at least in the non-left-join case) I am not sure I find it worth it add a keyword for this. |
xref #18674 |
cc @reidy-p this is a little bit trickier, we need to allow merges on compat categorical types, but should raise I think on incompat, but might be some cases where we are ok to merge (note that these should still merge just be turned into e.g. if the categoricals have the same categories and are unordered but just in a different order I think this might be ok
|
@jreback thanks. At the moment, merging on categorical columns seems to retain the
But many other cases lead to casting to
And there are probably other cases when casting to Should we raise instead of casting to |
Currently any type conversions on merge are silent, e.g.
#15321 will make
[26]
preserve a categorical dtype, but if the categories don't overlap, it will be converted to object.So, should there be a something like a
conversions='ignore'|'warn'|'error'
option?The text was updated successfully, but these errors were encountered: