-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DEPR: datetimelike inference with strings #41731
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
DEPR: datetimelike inference with strings #41731
Conversation
@@ -197,7 +197,8 @@ def test_to_timedelta_on_missing_values(self): | |||
) | |||
tm.assert_series_equal(actual, expected) | |||
|
|||
actual = to_timedelta(Series(["00:00:01", pd.NaT])) | |||
with tm.assert_produces_warning(FutureWarning, match="Inferring timedelta64"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you have some of the tests also assert NO warning if the data is not wrapped in a Series, e.g. just passed to to_timedelta
or to_datetime
for example should not warn and have the same result as the below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated + green
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be worth doing for some calls to to_datetime as well (followon ok)
this difference in behavior is one of the biggest things left keeping us from sharing more between Index/Series constructors.