-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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
DOC: defaults in method signature vs description #59880
Comments
Thanks for the report!
Rather that this, it would be helpful to compile a list of inaccuracies. |
As far as I know, we often use @pandas-dev/pandas-core: any suggestions on how to document this better? The |
Conceptually these describe two different things - the signature shows the implementation whereas the docstrings describes the interface; while they usually align, that's not a hard requirement Generally the no default sentinel is used when the value of None can be a legitimate argument (ex: wanting to actually fill an array with `None) |
There are three things then: the signature, the docstring signature, the docstring full description. Sure I was talking about the docs part. |
@rhshadrach , @WillAyd , |
Sure - feel free to push up any PRs for edits you see |
Somewhat tangential:
We currently use either |
Pandas version checks
main
hereLocation of the documentation
Everywhere.
Documentation problem
The default value in method signature and the default value in the method description is sometimes different.
Examples:
https://pandas.pydata.org/docs/reference/api/pandas.Series.replace.html:
does
Series.replace
's:to_replace
haveNone
(docs signature) as default, or have no default (docs description)?value
have no default (docs signature), orNone
(docs description)?https://pandas.pydata.org/docs/reference/api/pandas.read_csv.html:
does
read_csv
's:sep
have no default (docs signature), or';'
(docs description)?...
...
Suggested fix for documentation
Fix.
The text was updated successfully, but these errors were encountered: