-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DOC: don't teach infer_datetime_format in user_guide #50334
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
DOC: don't teach infer_datetime_format in user_guide #50334
Conversation
@@ -272,9 +272,6 @@ parse_dates : boolean or list of ints or names or list of lists or dict, default | |||
|
|||
.. note:: | |||
A fast-path exists for iso8601-formatted dates. | |||
infer_datetime_format : boolean, default ``False`` |
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.
Hi, we can't simply remove it. We want to add a deprecation warning before removing it when we enforce the actual deprecation
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.
Yea, I asked for it in the issue but no one replied
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.
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.
Hey - this parameter is now a no-op, so I'd say that it's correct to remove it from the user guide
It still shows in the docstring as deprecated, but I don't think there's any need to teach it in the user guide
Thoughts @phofl ?
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.
I would prefer mentioning that it is a no op but to keep it in here with a deprecation warning anyway. This should increase visibility, which is helpful with deprecations ( I think). Also keeps us consistent with what we are doing for other parameters in read_csv
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.
Sure but does a no-op need this much visibility? I think it looks confusing to beginners to read the user guide and find "you can use this parameter to speed things up. Though actually, never mind, it's deprecated, don't use it"
Ok for docstring, it's just for the user guide that I'm questioning the practice
I'll check tomorrow what's been done for other deprecations anyway, and what other libraries do
And sorry @ShashwatAgrawal20 for conflicting instructions here ☺
e1214b4
to
96594f1
Compare
@MarcoGorelli any updates? |
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.
How about:
- we mark it as deprecated in the list of parameters (as was done for
squeeze
in the example I linked) - we remove it from the section that teaches about what to try performance-wise, as it's no longer relevant (the deprecation is about how the parameter will be removed, the behaviour has already changed)
doc/source/user_guide/io.rst
Outdated
.. note:: | ||
The ``infer_datetime_format`` is deprecated and will be removed in the future versions. | ||
infer_datetime_format : boolean, default ``False`` |
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.
check here for how to mark as deprecated
pandas/doc/source/user_guide/io.rst
Lines 157 to 162 in eb226bd
squeeze : boolean, default ``False`` | |
If the parsed data only contains one column then return a ``Series``. | |
.. deprecated:: 1.4.0 | |
Append ``.squeeze("columns")`` to the call to ``{func_name}`` to squeeze | |
the data. |
doc/source/user_guide/io.rst
Outdated
1. Try to infer the format using ``infer_datetime_format=True`` (see section below). | ||
1. Try to infer the format using ``infer_datetime_format=True`` (this is deprecated and will be removed in the future versions.). |
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.
I'd remove it from here
doc/source/user_guide/io.rst
Outdated
24458940 Oct 10 06:44 test_table_compress.hdf | ||
24458940 Oct 10 06:44 test_table_compress.hdf |
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.
not sure what's happened with the line ending - can you run the pre-commit
checks on the files you've modified?
Yeah sorry if I wasn't clear enough. That's exactly what I wanted to do |
bb23c43
to
d30ed08
Compare
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.
thanks for updating
could you set a descriptive title please?
doc/source/user_guide/io.rst
Outdated
.. deprecated:: 1.5.2 | ||
``infer_datetime_format`` be deprecated (as a strict version of it will become the default); | ||
an easy workaround for non-strict parsing be clearly documented. | ||
|
||
Currently, the only way to ensure consistent parsing is by explicitly passing |
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.
could you copy the deprecation message from https://pandas.pydata.org/docs/dev/reference/api/pandas.to_datetime.html please
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.
@MarcoGorelli
are you talking about
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.
yup
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.
should I be directly using it as it is?
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.
yes
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.
thanks @ShashwatAgrawal20
@MarcoGorelli thanks! |
doc/user_guide/io.rst
.Just removed the
infer_datetime_format
from the docs.It's my first pull request & it's not fully complete, so can you guide me on what else changes should be made.
closes #35296