-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
API: dont-special-case datetimelike in setting new column #40084
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: dont-special-case datetimelike in setting new column #40084
Conversation
jbrockmendel
commented
Feb 26, 2021
- closes #xxxx
- tests added / passed
- Ensure all linting tests pass, see here for how to run them
- whatsnew entry
What's the change in behaviour exactly? It will no longer infer datetime, or will no longer only infer datetimes? (I mentioned that before, but I would find it helpful if you can generally provide a bit more context when opening PRs) |
I generally prefer brevity in cases where the title is descriptive and the code change is small: one line of code and 1 affected test |
"descriptive" for you (who has been doing the change and thus of course understands what it is about) is something else as descriptive enough for someone else who is not you ;) It's not because it is only a 1 line change that it is necessarily easy to understand what it actually changes. To know that, I would need to know by heart all the possible inferences that |
So big picture, the goal of this and other recent/upcoming PRs is to make this clearer, or at least less. In this case by removing usages of maybe_infer_to_datetimelike so we have fewer (ideally just one) flavor of casting. maybe_infer_to_datetimelike(object_array_of_datetimes) will cast to dt64, but will not cast for object_array_of_intervals. As a result, |