Skip to content

DOC: Docstring pandas index all any #20168

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 13, 2018
Merged

DOC: Docstring pandas index all any #20168

merged 7 commits into from
Mar 13, 2018

Conversation

alinde1
Copy link
Contributor

@alinde1 alinde1 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.any) #########################
################################################################################

Return whether any element is True.

Parameters
----------
*args
    These parameters will be passed to numpy.any.
**kwargs
    These parameters will be passed to numpy.any.

Returns
-------
any : bool or array_like (if axis is specified)
    A single element array_like may be converted to bool.

        See Also
        --------
        pandas.Index.all : Return whether all elements are True.

        Notes
        -----
        Not a Number (NaN), positive infinity and negative infinity
        evaluate to True because these are not equal to zero.

        Examples
        --------
        >>> index = pd.Index([0, 1, 2])
        >>> index.any()
        True

        >>> index = pd.Index([0, 0, 0])
        >>> index.any()
        False

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

Errors found:
        No extended summary found
        Errors in parameters section
                Parameters {'args', 'kwargs'} not documented
                Unknown parameters {'**kwargs', '*args'}
                Parameter "*args" has no type
                Parameter "**kwargs" has no type
################################################################################
######################### Docstring (pandas.Index.all) #########################
################################################################################

Return whether all elements are True.

Parameters
----------
*args
    These parameters will be passed to numpy.all.
**kwargs
    These parameters will be passed to numpy.all.

Returns
-------
all : bool or array_like (if axis is specified)
    A single element array_like may be converted to bool.

        See Also
        --------
        pandas.Index.any : Return whether any element is True.

        Notes
        -----
        Not a Number (NaN), positive infinity and negative infinity
        evaluate to True because these are not equal to zero.

        Examples
        --------
        >>> index = pd.Index([1, 2, 3])
        >>> index.all()
        True

        >>> index = pd.Index([0, 1, 2])
        >>> index.all()
        False

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

Errors found:
        No extended summary found
        Errors in parameters section
                Parameters {'kwargs', 'args'} not documented
                Unknown parameters {'**kwargs', '*args'}
                Parameter "*args" has no type
                Parameter "**kwargs" has no type

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.

Copy link
Contributor

@TomAugspurger TomAugspurger left a comment

Choose a reason for hiding this comment

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

Can you past the final docstring once the subs have been made? I'm trying to udnerstand outnames


Examples
--------
>>> index = pd.Index([1,2,3])
Copy link
Contributor

Choose a reason for hiding this comment

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

PEP8: space after commas

Copy link
Contributor Author

Choose a reason for hiding this comment

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

################################################################################
######################### Docstring (pandas.Index.all) #########################
################################################################################

Return whether all elements are True.

Parameters

*args
These parameters will be passed to numpy.all.
**kwargs
These parameters will be passed to numpy.all.

Returns

all : bool or array_like (if axis is specified)
A single element array_like may be converted to bool.

    See Also
    --------
    pandas.Index.any : Return whether any element is True.

    Notes
    -----
    Not a Number (NaN), positive infinity and negative infinity
    evaluate to True because these are not equal to zero.

    Examples
    --------
    >>> index = pd.Index([1, 2, 3])
    >>> index.all()
    True

    >>> index = pd.Index([0, 1, 2])
    >>> index.all()
    False

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

Errors found:
No extended summary found
Errors in parameters section
Parameters {'kwargs', 'args'} not documented
Unknown parameters {'**kwargs', '*args'}
Parameter "*args" has no type
Parameter "**kwargs" has no type

@TomAugspurger TomAugspurger added Docs Numeric Operations Arithmetic, Comparison, and Logical operations labels Mar 10, 2018
@TomAugspurger TomAugspurger added this to the 0.23.0 milestone Mar 10, 2018
See Also
--------
pandas.Index.any : Return whether any element is True.

Copy link
Contributor

Choose a reason for hiding this comment

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

pandas.Series.any as well


See Also
--------
pandas.Index.all : Return whether all elements are True.
Copy link
Contributor

Choose a reason for hiding this comment

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

pandas.Series.all

@jreback jreback removed this from the 0.23.0 milestone Mar 10, 2018
Antonio Linde and others added 2 commits March 10, 2018 18:26
@codecov
Copy link

codecov bot commented Mar 13, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@ec631ce). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #20168   +/-   ##
=========================================
  Coverage          ?   91.72%           
=========================================
  Files             ?      150           
  Lines             ?    49155           
  Branches          ?        0           
=========================================
  Hits              ?    45089           
  Misses            ?     4066           
  Partials          ?        0
Flag Coverage Δ
#multiple 90.11% <100%> (?)
#single 41.85% <100%> (?)
Impacted Files Coverage Δ
pandas/core/indexes/base.py 96.67% <100%> (ø)

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 ec631ce...23c2c3d. Read the comment docs.

@TomAugspurger TomAugspurger added this to the 0.23.0 milestone Mar 13, 2018
@TomAugspurger TomAugspurger merged commit 90d4c57 into pandas-dev:master Mar 13, 2018
@TomAugspurger
Copy link
Contributor

Thanks @alinde1!

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.

3 participants