-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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
hide Index.get_values in docs and IPython tab completion #28772
Conversation
Does this make the doc unaccessible or just not shown in the API reference? |
The removes the method name from Ipython ( My interest is getting these out of the ipython tab-completion, so tabbing is more focused. I could revert the removal in the doc TOC, as I can see it's reasonable that deprecated methods are shown there. |
Makes sense. I'm fine with this either way - @TomAugspurger or @jorisvandenbossche might have some insights into how we've historically handled deprecated functions in the TOC |
+1 on removing them from tab completion (did that recently as well for attributes). For the docs, in the autosummary tables they get a clear "DEPRECATED" in front (see eg in https://pandas.pydata.org/pandas-docs/stable/reference/series.html), there has been done some work to do that automatically. So I am also fine with keeping them, as it is quite visually clear they are deprecated. But of course, if it are many, it also clutters the page. |
thanks . I wonder if we can have a test generally to avoid these issues? e.g. we should try to see if any tab completables show a deprecation warning and then fail the test. |
@jreback I answered about that in the other PR as well: #28524 (comment) |
In #28621 I hid the deprecated method
Index.set_value
in the docs (inindexing.rst
) and in the REPL/Ipython (by adding it toIndex._deprecations
). I like that as it hides not-recommended parts of the pandas API and guides users away from deprecated methods.I've given the already deprecated method
Indexc.get_values
the same treatment in this PR. If there's consensus about it, I could go through various deprecations (at least the more obscure ones, likeget_ftype_counts
andget_ftype_counts
etc.).