Skip to content
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/DEPR: ensure that @deprecated functions have correct docstring #18215

Merged

Conversation

jorisvandenbossche
Copy link
Member

@jorisvandenbossche jorisvandenbossche commented Nov 10, 2017

Follow-up on #16955, the Series.argmin/argmax now have a docstring.

Currently:

In [1]: pd.Series.argmax?
Signature: pd.Series.argmax(*args, **kwargs)
Docstring: <no docstring>
File:      ~/scipy/pandas/pandas/util/_decorators.py
Type:      function

With this PR:

In [1]: pd.Series.argmax?
Signature: pd.Series.argmax(self, axis=None, skipna=True, *args, **kwargs)
Docstring:
'argmax' is deprecated, use 'idxmax' instead. The behavior of 'argmax'
will be corrected to return the positional maximum in the future. Use
'series.values.argmax' to get the position of the maximum now.

Index *label* of the first occurrence of maximum of values.

Parameters
----------
skipna : boolean, default True
    Exclude NA/null values

Returns
-------
idxmax : Index of maximum of values

Notes
-----
This method is the Series version of ``ndarray.argmax``. This method
returns the label of the maximum, while ``ndarray.argmax`` returns
the position. To get the position, use ``series.values.argmax()``.

See Also
--------
DataFrame.idxmax
numpy.ndarray.argmax
File:      ~/scipy/pandas/pandas/core/series.py
Type:      function

@pep8speaks
Copy link

pep8speaks commented Nov 10, 2017

Hello @jorisvandenbossche! Thanks for updating the PR.

Line 41:28: W503 line break before binary operator

Comment last updated on November 13, 2017 at 23:33 Hours UTC

@jorisvandenbossche
Copy link
Member Author

This needs #18256 to be merged first

@pandas-dev pandas-dev deleted a comment from codecov bot Nov 13, 2017
@pandas-dev pandas-dev deleted a comment from codecov bot Nov 13, 2017
@codecov
Copy link

codecov bot commented Nov 14, 2017

Codecov Report

Merging #18215 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #18215      +/-   ##
==========================================
- Coverage    91.4%   91.38%   -0.02%     
==========================================
  Files         164      164              
  Lines       49878    49880       +2     
==========================================
- Hits        45590    45583       -7     
- Misses       4288     4297       +9
Flag Coverage Δ
#multiple 89.19% <100%> (ø) ⬆️
#single 39.42% <100%> (-0.06%) ⬇️
Impacted Files Coverage Δ
pandas/core/series.py 95% <ø> (ø) ⬆️
pandas/util/_decorators.py 81.03% <100%> (+0.33%) ⬆️
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.8% <0%> (-0.1%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 69472f9...ab2ed84. Read the comment docs.

@jorisvandenbossche jorisvandenbossche merged commit 22fcf43 into pandas-dev:master Nov 14, 2017
@jorisvandenbossche jorisvandenbossche deleted the doc-missing-docstrings branch November 14, 2017 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants