-
-
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
DEPR: object inference in to_stata #56536
base: main
Are you sure you want to change the base?
Conversation
This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this. |
Now that we have the |
Going to hold off until #55901 goes in |
pandas/io/stata.py
Outdated
@@ -429,6 +429,14 @@ def parse_dates_safe( | |||
d["days"] = days_in_ns // NS_PER_DAY | |||
|
|||
elif infer_dtype(dates, skipna=False) == "datetime": | |||
# - Deprecated casting object-dtype columns of datetimes to datetime64 when writing to stata; call df=df.infer_objects() before writing to stata instead (:issue:`??`) |
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.
Is this comment a bit long?
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.
will update
it looks like we don't have any test cases that get to the relevant path. editing test_big_dates to use two options: first is to change the relevant path to call infer_objects() and then recurse, second is to just rip out the now-identified-as-buggy path. preferences? |
Probably just take it out. Simplicity is its own reward. |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.The "do X instead" won't actually work until 3.0, so this has to wait until then (and can't write the whatsnew until the 3.0 file exists). Putting this here so I don't forget about it.