-
-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Closed
Closed
Copy link
Labels
DocsNeeds TriageIssue that has not been reviewed by a pandas team memberIssue that has not been reviewed by a pandas team member
Description
Pandas version checks
- I have checked that the issue still exists on the latest versions of the docs on
main
here
Location of the documentation
In the docs the sphinx extension sphinx-copybutton
is added but the output is not stripped. This means, that code is copied with possible outputs.
Line 59 in 73b5578
"sphinx_copybutton", |
A possible solution is documented in the section using regex prompt identifiers.
Documentation problem
The main problem is, that examples in code blocks can have some output and will not work in a plain jupyter notebook cell without touching the copied code.
One possible example is in pandas.DataFrame.to_dict
.
Suggested fix for documentation
The solution is to add
copybutton_prompt_text = r">>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.{3,}: | {5,8}: "
copybutton_prompt_is_regexp = True
to conf.py
.
Metadata
Metadata
Assignees
Labels
DocsNeeds TriageIssue that has not been reviewed by a pandas team memberIssue that has not been reviewed by a pandas team member