Skip to content

DOC: update the Period.daysinmonth docstring #20295

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

Conversation

IHackPy
Copy link
Contributor

@IHackPy IHackPy commented Mar 12, 2018

Period.daysinmonth

################################################################################
#################### Docstring (pandas.Period.daysinmonth) ####################
################################################################################

Return total number of days of the month in given Period.

This attribute returns the total number of days of given month

Returns

Int
Number of days with in month

See also

Period.dayofweek
Return the day of the week

Period.dayofyear
Return the day of the year

Examples

import pandas as pd
p = pd.Period("2018-03-11", freq='H')
p.daysinmonth
31

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

Docstring for "pandas.Period.daysinmonth" correct. :)

@WillAyd
Copy link
Member

WillAyd commented Mar 12, 2018

xref #20294 a lot of the feedback will be similar

@IHackPy
Copy link
Contributor Author

IHackPy commented Mar 12, 2018

sure will work on both Thaks for reviewing

@codecov
Copy link

codecov bot commented Mar 12, 2018

Codecov Report

Merging #20295 into master will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #20295      +/-   ##
==========================================
+ Coverage    91.7%   91.73%   +0.02%     
==========================================
  Files         150      150              
  Lines       49168    49168              
==========================================
+ Hits        45090    45102      +12     
+ Misses       4078     4066      -12
Flag Coverage Δ
#multiple 90.11% <ø> (+0.02%) ⬆️
#single 41.86% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/plotting/_converter.py 66.81% <0%> (+1.73%) ⬆️

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 df2e361...c2e5c33. Read the comment docs.

@jreback jreback added Docs Period Period data type labels Mar 12, 2018
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.

Small comment, looks good for the rest

@@ -1275,6 +1275,25 @@ cdef class _Period(object):

@property
def daysinmonth(self):
"""
Get total days of month that a Period falls on.
Copy link
Member

Choose a reason for hiding this comment

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

I would maybe rephrase this as "Get the total number of days of the month that the Period falls in"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure will update now . As I'm not good in making sentences thanks for guiding :) 👍

See Also
--------
Period.days_in_month : Return the days of the month

Copy link
Member

Choose a reason for hiding this comment

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

no blank line is needed here

@IHackPy
Copy link
Contributor Author

IHackPy commented Mar 12, 2018

@jorisvandenbossche why ci test fail here ?

@jreback
Copy link
Contributor

jreback commented Mar 12, 2018

ignore the ci

i have had to cancel most jobs

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

@himanshuawasthi95 Thanks!

@IHackPy
Copy link
Contributor Author

IHackPy commented Mar 12, 2018

thank u @jorisvandenbossche @WillAyd @jreback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs Period Period data type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants