Skip to content

DOC: update the Period.start_time attribute docstring #20325

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

hammadmashkoor
Copy link
Contributor

@hammadmashkoor hammadmashkoor commented Mar 13, 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:

(pandas_dev) root@kalih:~/pythonpanda/pandas# python scripts/validate_docstrings.py pandas.Period.start_time

################################################################################
##################### Docstring (pandas.Period.start_time) #####################
################################################################################

Get the Timestamp for the start of the period.

Returns
-------
Timestamp

See also
--------
Period.dayofyear : Return the day of year.
Period.daysinmonth : Return the days in that month.
Period.dayofweek : Return the day of the week.

Examples
--------
>>> period = pd.Period('2012-1-1', freq='D')
>>> period
Period('2012-01-01', 'D')

>>> period.start_time
Timestamp('2012-01-01 00:00:00')
>>> period.end_time
Timestamp('2012-01-01 23:59:59.999999999')

################################################################################
################################## 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.

@jreback jreback added Docs Period Period data type labels Mar 13, 2018
@@ -1164,6 +1164,36 @@ cdef class _Period(object):

@property
def start_time(self):
"""
Return the Timestamp.
Copy link
Contributor

Choose a reason for hiding this comment

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

"Get the Timestamp for the start of the period."

"""
Return the Timestamp.

This attribute returns the timestamp of the particular
Copy link
Contributor

Choose a reason for hiding this comment

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

This can be removed I think.


See also
--------
Period.dayofyear
Copy link
Contributor

Choose a reason for hiding this comment

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

These can be one line each. Period.dayofyear : Return the day of year.

Period.dayofweek
Return the day of the week.

Returns
Copy link
Contributor

Choose a reason for hiding this comment

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

Move returns above See Also

@codecov
Copy link

codecov bot commented Mar 14, 2018

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #20325      +/-   ##
==========================================
- Coverage   91.76%   91.73%   -0.03%     
==========================================
  Files         150      150              
  Lines       49151    49151              
==========================================
- Hits        45102    45090      -12     
- Misses       4049     4061      +12
Flag Coverage Δ
#multiple 90.12% <ø> (-0.03%) ⬇️
#single 41.9% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/plotting/_converter.py 65.07% <0%> (-1.74%) ⬇️

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 3783ccc...5ba42a7. Read the comment docs.

@TomAugspurger TomAugspurger added this to the 0.23.0 milestone Mar 14, 2018
@TomAugspurger
Copy link
Contributor

Added end_time to the see also.

Thanks @hammadmashkoor .

@TomAugspurger TomAugspurger merged commit e6c2647 into pandas-dev:master Mar 14, 2018
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.

3 participants