-
Notifications
You must be signed in to change notification settings - Fork 28
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
Make explicit in pandas docs the imports and the options #149
Comments
I would like to work on this issue. |
Should we let remain using of aliases like |
|
On the fist occurence of |
That part is a bit tricky. I think you should be able to not have that, and everything will work well if the sphinx build called from the right directory. The If you check in |
See pandas-dev/pandas#28038
Until now, there has been a hidden code block at the beginning of every documentation page with imports, random seeds and options. There is agreement to make that code explicit, so the users can reproduce exactly the code, and there is no "magic" going on.
Let's start by opening a PR to remove that header in this page: https://pandas.pydata.org/pandas-docs/stable/user_guide/io.html
My preferred option is to remove the
{{ header }}
variable, keep thecurrentmodule
in its place, but not the code block. Then, just add what it's needed in the code blocks when things are first used. For example, in the first block code addimport pandas as pd
at the beginning. We probably only need the code with the random seed in the block with the first use ofnumpy.random
.After the change it can be good to run a diff of the html version before the change, and after the change, and see how much did it change (and add that diff to the PR description).
Note that several people in the pandas team is likely to have opinions on how this change should be implemented. So be prepared for several reviews, and several iterations of proposed changes and questions. :)
The text was updated successfully, but these errors were encountered: