Skip to content

DOC: update the pandas.Series.dt.is_month_end docstring #20181

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 6 commits into from
Mar 17, 2018

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):

  • 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.Series.dt.is_month_end)  ##################
################################################################################

Return a boolean indicating whether the date is the last day of the month.

Returns
-------
is_month_end : Series of boolean.

See Also
--------
is_month_start : Return a boolean indicating whether the date is
    the first day of the month.

Examples
--------
>>> 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_end
0    False
1    True
2    False
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.

No extended summary required in this case (as confirmed with peers).

@pep8speaks
Copy link

pep8speaks commented Mar 10, 2018

Hello @janelle! Thanks for updating the PR.

Cheers ! There are no PEP8 issues in this Pull Request. 🍻

Comment last updated on March 17, 2018 at 11:56 Hours UTC

@Cheukting
Copy link
Contributor

The sentences for See Also section is too long, need to break it into 2 lines.

@janelle janelle force-pushed the pandas-is_month_end branch from 232520f to 5749f9e Compare March 11, 2018 09:15
@codecov
Copy link

codecov bot commented Mar 11, 2018

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #20181   +/-   ##
=========================================
  Coverage          ?   91.92%           
=========================================
  Files             ?      150           
  Lines             ?    50572           
  Branches          ?        0           
=========================================
  Hits              ?    46486           
  Misses            ?     4086           
  Partials          ?        0
Flag Coverage Δ
#multiple 90.35% <ø> (?)
#single 42.13% <ø> (?)
Impacted Files Coverage Δ
pandas/core/indexes/datetimes.py 95.64% <ø> (ø)

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 f7a5682...2b540e0. Read the comment docs.

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

Looks good!

Added a commit that fixes the PEP8 issues, and added an example with an index (the docstring is shared between Series.dt and DatetimeIndex)

@jorisvandenbossche jorisvandenbossche merged commit e902764 into pandas-dev:master Mar 17, 2018
@jorisvandenbossche jorisvandenbossche added this to the 0.23.0 milestone Mar 17, 2018
@jorisvandenbossche
Copy link
Member

Thanks @janelle !

nehiljain added a commit to nehiljain/pandas that referenced this pull request Mar 21, 2018
…ame_describe

* upstream/master: (158 commits)
  Add link to "Craft Minimal Bug Report" blogpost (pandas-dev#20431)
  BUG: fixed json_normalize for subrecords with NoneTypes (pandas-dev#20030) (pandas-dev#20399)
  BUG: ExtensionArray.fillna for scalar values (pandas-dev#20412)
  DOC" update the Pandas core window rolling count docstring" (pandas-dev#20264)
  DOC: update the pandas.DataFrame.plot.hist docstring (pandas-dev#20155)
  DOC: Only use ~ in class links to hide prefixes. (pandas-dev#20402)
  Bug: Allow np.timedelta64 objects to index TimedeltaIndex (pandas-dev#20408)
  DOC: add disallowing of Series construction of len-1 list with index to whatsnew (pandas-dev#20392)
  MAINT: Remove weird pd file
  DOC: update the Index.isin docstring (pandas-dev#20249)
  BUG: Handle all-NA blocks in concat (pandas-dev#20382)
  DOC: update the pandas.core.resample.Resampler.fillna docstring (pandas-dev#20379)
  BUG: Don't raise exceptions splitting a blank string (pandas-dev#20067)
  DOC: update the pandas.DataFrame.cummax docstring (pandas-dev#20336)
  DOC: update the pandas.core.window.x.mean docstring (pandas-dev#20265)
  DOC: update the api.types.is_number docstring (pandas-dev#20196)
  Fix linter (pandas-dev#20389)
  DOC: Improved the docstring of pandas.Series.dt.to_pytimedelta (pandas-dev#20142)
  DOC: update the pandas.Series.dt.is_month_end docstring (pandas-dev#20181)
  DOC: update the window.Rolling.min docstring (pandas-dev#20263)
  ...
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants