Skip to content

DOC: Docstring for pandas.index.max #20130

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

Merged
merged 7 commits into from
Mar 16, 2018

Conversation

JoanMartin
Copy link
Contributor

@JoanMartin JoanMartin commented Mar 10, 2018

Checklist for the pandas documentation sprint (ignore this if you are doing
an unrelated PR):

  • PR title is "DOC: update the docstring"
  • The validation script passes: scripts/validate_docstrings.py <your-function-or-method>
  • The PEP8 style check passes: git diff upstream/master -u -- "*.py" | flake8 --diff
  • The html version looks good: python doc/make.py --single <your-function-or-method>
  • It has been proofread on language by another sprint participant

Please include the output of the validation script below between the "```" ticks:

################################################################################
######################### Docstring (pandas.Index.max) #########################
################################################################################

Return the maximum value of the object.

Return the maximum value of the object within the same type.

Returns
-------
scalar
    Maximum value.

See Also
--------
Series.max : Return the maximum value of the object.
DataFrame.max : Return the maximum value of the object.
Index.min : Return the minimum value of the object.

Examples
--------
>>> idx = pd.Index([3, 2, 1])
>>> idx.max()
3

>>> idx = pd.Index(['c', 'b', 'a'])
>>> idx.max()
'c'

################################################################################
################################## Validation ##################################
################################################################################

Docstring for "pandas.Index.max" correct. :)

If the validation script still gives errors, but you think there is a good reason
to deviate in this case (and there are certainly such cases), please state this
explicitly.

Return the maximum value of the object.

Return the maximum value of the object within the same type.
Remember you also can access to a Dataframe's index as Dataframe.index.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence may need some rewording

@@ -791,7 +791,7 @@ def max(self):
Return the maximum value of the object.

Return the maximum value of the object within the same type.
Remember you also can access to a Dataframe's index as Dataframe.index.
The Index of a DataFrame can be accessed as pandas.DataFrame.index.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rewrite the last sentence to:
The DataFrame Index can be accessed using pandas.DataFrame.index.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! :)

@caperutxa
Copy link

Looks so nice

Return the maximum value of the object.

Return the maximum value of the object within the same type.
The DataFrame Index can be accessed using pandas.DataFrame.index.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this last sentence is unecessary


Returns
-------
object
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scalar

See Also
--------
Index.min : Return the minimum value of the object.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

link to Series.max, DataFrame.max

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! =)

@jreback jreback added Docs Numeric Operations Arithmetic, Comparison, and Logical operations labels Mar 10, 2018
@JoanMartin
Copy link
Contributor Author

Hi @jreback,
is the commit correct now? =)

[ci skip]
@codecov
Copy link

codecov bot commented Mar 16, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@fb556ed). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #20130   +/-   ##
=========================================
  Coverage          ?   91.72%           
=========================================
  Files             ?      150           
  Lines             ?    49152           
  Branches          ?        0           
=========================================
  Hits              ?    45086           
  Misses            ?     4066           
  Partials          ?        0
Flag Coverage Δ
#multiple 90.11% <ø> (?)
#single 41.84% <ø> (?)
Impacted Files Coverage Δ
pandas/core/base.py 96.78% <ø> (ø)

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 fb556ed...ba435c2. Read the comment docs.

@TomAugspurger TomAugspurger merged commit acb3fd7 into pandas-dev:master Mar 16, 2018
@TomAugspurger
Copy link
Contributor

Thanks @JoanMartin 👍

@TomAugspurger TomAugspurger added this to the 0.23.0 milestone Mar 16, 2018
@JoanMartin JoanMartin deleted the doc-pandas.index.max branch March 17, 2018 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs Numeric Operations Arithmetic, Comparison, and Logical operations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants