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: update the pandas.Series.dt.is_month_start docstring #20146

Closed
wants to merge 5 commits into from

Conversation

janelle
Copy link
Contributor

@janelle janelle commented Mar 10, 2018

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

  • [ X] PR title is "DOC: update the docstring"
  • [ X] The validation script passes: scripts/validate_docstrings.py <your-function-or-method>
  • [ X] The PEP8 style check passes: git diff upstream/master -u -- "*.py" | flake8 --diff
  • [ X] 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.Series.dt.is_month_start)  #################
################################################################################

Return a boolean indicating if the date is the first day of the month.

Returns
-------
is_month_start : Series of boolean

See Also
--------
is_month_end : Returns a boolean indicating if the date is the last day of the month.

Examples
--------
>>> import pandas as pd
>>> dates = pd.Series(pd.date_range("2018-02-27", periods = 3))
>>> dates
0   2018-02-27
1   2018-02-28
2   2018-03-01
dtype: datetime64[ns]
>>> dates.dt.is_month_start
0    False
1    False
2    True
dtype: bool

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

Errors found:
	No extended summary found

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.

This function does not require an extended summary. Peers find it very clear with a short summary too.

@pep8speaks
Copy link

pep8speaks commented Mar 10, 2018

Hello @janelle! Thanks for updating the PR.

Line 1731:80: E501 line too long (83 > 79 characters)

Comment last updated on March 10, 2018 at 15:01 Hours UTC

Examples
--------
>>> import pandas as pd
>>> dates = pd.Series(pd.date_range("2018-02-27", periods = 3))

Choose a reason for hiding this comment

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

PEP8 doesn't allow spaces around keyword parameters. i.e.: periods=3, instead of periods = 3

Choose a reason for hiding this comment

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

import pandas as pd is not necessary.

@@ -1736,12 +1736,12 @@ def freq(self, value):

See Also
--------
is_month_end : Returns a boolean indicating if the date is the last day of the month.
is_month_end : Returns a boolean indicating if the date is the last day
of the month.

Choose a reason for hiding this comment

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

Next line should be indented:

        is_month_end : Returns a boolean indicating if the date is the last day
            of the month.

@janelle
Copy link
Contributor Author

janelle commented Mar 10, 2018

thanks for reviewing, adjusted line lengths and writing style now.

@janelle
Copy link
Contributor Author

janelle commented Mar 10, 2018

@arnau126 adjusted line lengths and writing style

@CalmDownKarm
Copy link
Contributor

CalmDownKarm commented Oct 8, 2018

This PR is perhaps no longer relevant, the _field_accessor(...) transform was replaced by the _wrap_field_accessor(name) in this commit @datapythonista

@datapythonista
Copy link
Member

@CalmDownKarm the function has been moved here:

I think the best would be to start a fresh branch from master, and copy the code from the docstring in this PR to that location.

CC: @jbrockmendel

@datapythonista
Copy link
Member

Discontinued and superseded by #23051

@jorisvandenbossche jorisvandenbossche added this to the No action milestone Oct 26, 2018
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.

6 participants