-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: sample codes should not override Python built-in functions #47606
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
Comments
Thanks for the report. Happy to have a pull request to adjust the docs here |
Sorry, for the duplicate pull request. I didn't know @wany-oh would take care of it, I just did it in case.. |
I just added another commit. I made some changes relating to this issue with example code overriding built-in functions/parameters. In this case, using a variable called "columns" for the type and name of each column can create confusion with Dataframe Columns. I learned that this was also known as a "schema" so I removed a few instances of this issue to rename it to "column_schema". I used Linux grep to find all instances of this issue, and manually went through all of them to make sure to differentiate between the actual Dataframe.columns = "[foo]" and column = "[foo]" You will notice that all my changes have two small parts :
Please let me know if this is ok. |
It was almost at the same time. Thank you for the follow up. |
I disagree with that. Having a variable named the same as the argument name associates them with each other in my opinion |
Pandas version checks
main
hereLocation of the documentation
For example, https://pandas.pydata.org/pandas-docs/stable/user_guide/groupby.html#transformation
Documentation problem
It is not good that the user guide lists codes that override Python built-in functions.
This is the only part I happened to find, but others may exist in doc. If so, its should be revised as well.
Suggested fix for documentation
In this case,
max
/min
should rename likemax_ts
/min_ts
.The text was updated successfully, but these errors were encountered: