DOC: inconsistent docs-string signatures for shared functions
See original GitHub issuexref #15580
related to this is our inconsistent treatment of the actual args in shared doc strings, e.g.
so the following have exactly the same arguments to the doc-string (except for the first 1-2 which are the axes: index, or index & columns).
The doc-strings themselves are correct, but the signature are hidden. I think easiest is simply to actually list out the args where they are defined (e.g in core/series.py
for example).
Signature: pd.Series.reindex(self, index=None, **kwargs)
Docstring:
Conform Series to new index with optional filling logic, placing
NA/NaN in locations having no value in the previous index. A new object
is produced unless the new index is equivalent to the current one and
copy=False
Signature: pd.SparseSeries.reindex(self, index=None, method=None, copy=True, limit=None, **kwargs)
Docstring:
Conform SparseSeries to new index with optional filling logic, placing
NA/NaN in locations having no value in the previous index. A new object
is produced unless the new index is equivalent to the current one and
copy=False
Signature: pd.DataFrame.reindex(self, index=None, columns=None, **kwargs)
Docstring:
Conform DataFrame to new index with optional filling logic, placing
NA/NaN in locations having no value in the previous index. A new object
is produced unless the new index is equivalent to the current one and
copy=False
There are a bunch of functions like this.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Manipulating function docstring and signature in base class
1. run and _run are two different functions. · I want to manually manipulate the docstring, as I currently do in Base.__init__ (see...
Read more >[v2.12 Regression] Asterisk argument `mising-param-doc` vs ...
Just another thought, if the goal of the docstring is to document the function and its signature you would need the asterisks to...
Read more >Common issues and solutions - mypy 0.991 documentation
Incompatible overrides The signature of a method in a subclass should accept all valid calls to the base class method. Mypy treats a...
Read more >Support for Google Style Python docstrings : PY-9795
PY-16987 In functions with Google and Numpy style docstrings parameter ... warn when the parameter naming in the comment doesn't match the method...
Read more >pybind11 Documentation - Read the Docs
Function signatures are precomputed at compile time (using constexpr), ... m.doc() = "pybind11 example plugin"; // optional module docstring.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, that is correct. Annoying? Yes. Necessary? Debatable, but there was enough push early on from users for this to be implemented.
Hi @jreback , does this still need to be done ? I would like to take this on.