Skip to content

DOC: improved the docstring of pandas.Index.min() #20140

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 23 commits into from
Mar 16, 2018
Merged
Changes from 19 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
1802ae4
DOC: Improved docstring of pandas.index.min()
juanhuguetgarcia Mar 10, 2018
752f385
Merge remote-tracking branch 'upstream/master' into pandas.index.min
juanhuguetgarcia Mar 10, 2018
fdaee80
DOC: docstring improved pandas.index.min
juanhuguetgarcia Mar 10, 2018
c44accd
DOC: improved docstring pandas.index.min
juanhuguetgarcia Mar 10, 2018
12cfd8d
DOC: improved docstring pandas.index.min
juanhuguetgarcia Mar 10, 2018
dfd389d
DOC: improved docstring pandas.index.min
juanhuguetgarcia Mar 10, 2018
4bc62e6
DOC: improved docstring pandas.index.min
juanhuguetgarcia Mar 10, 2018
2ce2921
DOC: improved docstring pandas.index.min
juanhuguetgarcia Mar 10, 2018
e717374
BUG: Check for wrong arguments in index subclasses constructors (#20017)
spacesphere Mar 10, 2018
49a6e08
DOC: lint
jreback Mar 10, 2018
4e8e937
DOC: Improved the docstring of Series.str.findall (#19982)
jcontesti Mar 10, 2018
b437afd
DOC: docstring improved pandas.index.min
juanhuguetgarcia Mar 10, 2018
e47f59f
Merge remote-tracking branch 'upstream/master' into HEAD
juanhuguetgarcia Mar 10, 2018
d3b3398
DOC: improved docstring pandas.index.min
juanhuguetgarcia Mar 10, 2018
9bf1cae
DOC: improved docstring pandas.index.min
juanhuguetgarcia Mar 10, 2018
fe581ba
DOC: improved docstring pandas.index.min
juanhuguetgarcia Mar 10, 2018
b5fc47b
DOC: improved docstring pandas.index.min
juanhuguetgarcia Mar 10, 2018
4ea4351
DOC: improved docstring pandas.index.min
juanhuguetgarcia Mar 10, 2018
ace5676
Merge branch 'pandas.index.min' of https://github.com/juanhuguetgarci…
juanhuguetgarcia Mar 10, 2018
5c00e65
DOC:improved docstring pandas.index.min
juanhuguetgarcia Mar 10, 2018
c7887cc
DOC:improved docstring pandas.index.min
juanhuguetgarcia Mar 10, 2018
4896e0b
Updated [ci skip]
TomAugspurger Mar 16, 2018
7d65b9e
Fixup [ci skip]
TomAugspurger Mar 16, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion pandas/core/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,31 @@ def argmax(self, axis=None):
return nanops.nanargmax(self.values)

def min(self):
""" The minimum value of the object """
"""
Return the minimum value of the Index object.

Return the minimum value of the object within the same type.
The Index of a DataFrame can be accessed as pandas.DataFrame.index.

Returns
-------
Scalar or object.
minimum value
Copy link
Contributor

@villasv villasv Mar 10, 2018

Choose a reason for hiding this comment

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

The description must start with a capital letter, and finish with a dot.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, perhaps I wasn't clear before.

scalar or object
            Minimum value.

I'll quote the docs:

The documentation of the return is also similar to the parameters. But in this case, no name will be provided, unless the method returns or yields more than one value (a tuple of values).

The parameters are defined by their name, followed by a space, a colon, another space, and the type (or types). Note that the space between the name and the colon is important. Types are not defined for *args and **kwargs, but must be defined for all other parameters. After the parameter definition, it is required to have a line with the parameter description, which is indented, and can have multiple lines. The description must start with a capital letter, and finish with a dot.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think now should be fine, thanks!


See Also
--------
Index.max : Return the maximum value of the object.

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

>>> idx = pd.Index(['c', 'b', 'a'])
>>> idx.min()
'a'
"""
return nanops.nanmin(self.values)

def argmin(self, axis=None):
Expand Down