-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG/DEPR: Fix unwanted warnings from the Series(Index[datetime objects]) deprecation #38182
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
Comments
I see #37193 has been fixed. Are there others that we can just fix internally? I don't see any good option other than hunting these down. Shorthand: dti = "instance of DatetimeIndex", dti_obj = dti.astype(object) Two cases come to mind:
I can imagine (ugly) ways to check whether we're in case 1 vs case 2, but I don't have any idea how to determine at runtime that both 2a and 2b hold. Do you think that's feasible? |
I don't think it is fixed? (or at least not that I am aware of, and the linked PR only suppressed the warning in the tests, not in the actual code). See the linked example at #37193 (comment), which still raises the warning when plotting:
|
@jorisvandenbossche @jbrockmendel what's the status here? As this has not been fixed and the release is imminent are we reverting #36697 for 1.2 and deferring to 1.3? |
@jorisvandenbossche @jbrockmendel @jreback can't be reverted automatically. will start the manual revert shortly. may not be difficult, but please lmk if this is not what we want to do. |
It should certainly not be reverted fully. I think the So only those lines in the diff: https://github.com/pandas-dev/pandas/pull/36697/files#diff-a5257444a1b322d619680fc77361cc6ea11ef36b363b4bb2289fdef0f41feb70R419-R425 |
Thanks @jorisvandenbossche i'll update #38679 |
@jorisvandenbossche can you respond to #38182 (comment) |
See #36697 (comment) and #37193 (comment)
Due to the
Index.is_all_dates
+Series(Index[datetime object])
deprecation warnings, there are several code examples that are not using this attribute or constructor method directly, that still cause this warning (from internal pandas code, without direct control over this by the user).Users should not see unrelated deprecation warnings from the internals of pandas that they can't do anything about themselves, so IMO we should either fix those for 1.2, or delay the deprecationg for 1.3
The text was updated successfully, but these errors were encountered: