DOC: make api docs reflect api usage (#4539) #5208
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #4539.
This removes all use of
.. currentmodule:: pandas.some.submodule
(in favor of.. currentmodule:: pandas
) in api.rst. Rationale is that docs should reflect the user api usage.Only exception are
pandas.io.sql.read_frame/write_frame
andpandas.io.stata.StataReader
methods, because they are not available in the top-level pandas namespace.All old links will remain valid because they are still generated because I added all those in a comment at the bottom in api.rst (only not for Index, because this was only added very recently in api.rst).
The downside with this approach is that you now get warnings when building the docs (
document isn't included in any toctree
for these functions). I am not sure how I can prevent this while keeping the old links but not including it visually in api.rst.