Skip to content

DOC: Add Timestamp, Period, Timedelta, and Interval to api.rst #17424

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 2 commits into from
Sep 7, 2017

Conversation

GuessWhoSamFoo
Copy link
Contributor

@GuessWhoSamFoo GuessWhoSamFoo commented Sep 3, 2017

@codecov
Copy link

codecov bot commented Sep 3, 2017

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17424      +/-   ##
==========================================
- Coverage   91.15%   91.14%   -0.02%     
==========================================
  Files         163      163              
  Lines       49581    49591      +10     
==========================================
  Hits        45198    45198              
- Misses       4383     4393      +10
Flag Coverage Δ
#multiple 88.92% <ø> (ø) ⬆️
#single 40.25% <ø> (-0.07%) ⬇️
Impacted Files Coverage Δ
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/io/parquet.py 65.38% <0%> (-0.37%) ⬇️
pandas/core/frame.py 97.72% <0%> (-0.1%) ⬇️
pandas/core/indexes/base.py 96.29% <0%> (ø) ⬆️
pandas/core/indexes/multi.py 96.9% <0%> (ø) ⬆️
pandas/plotting/_core.py 82.69% <0%> (+0.01%) ⬆️
pandas/core/indexes/range.py 92.28% <0%> (+0.09%) ⬆️
pandas/core/indexes/datetimes.py 95.43% <0%> (+0.09%) ⬆️

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 1981b67...afeba3a. Read the comment docs.

@gfyoung gfyoung added Docs Datetime Datetime data dtype labels Sep 3, 2017
@@ -1438,6 +1438,15 @@ Categorical Components

.. _api.intervalindex:

Interval
--------

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add properties and methods for these Scalars? (you might be able to get away with a directive to list all of them, for Period/Interval might be ok, Timestamp will show everything from its inheritied classes). If you can build the docs and show would be great (if there are too many things shown, we might just list some attributes / methods and point to the datetime.datetime docs otherwise.)

Can you also add for Timedelta.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

screenshot from 2017-09-07 02-07-13
Ends up looking like above for Timestamp and Period. There's also room to clarify days_in_month vs daysinmonth as a compatibility alias. It looks like a lot of the existing properties don't need to be there - any guidance on this?

@@ -1567,6 +1576,22 @@ Conversion
DatetimeIndex.to_pydatetime
DatetimeIndex.to_series

Period
------

Copy link
Contributor

Choose a reason for hiding this comment

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

also these need to go in a new section: Scalars I think (alternatively they could go with there associated Indexes), but I think a Scalars section is fine.

@GuessWhoSamFoo GuessWhoSamFoo changed the title DOC: Add Timestamp, Period, and Interval to api.rst DOC: Add Timestamp, Period, Timedelta, and Interval to api.rst Sep 7, 2017
@jreback jreback added this to the 0.21.0 milestone Sep 7, 2017
@jreback jreback merged commit 9dc01c4 into pandas-dev:master Sep 7, 2017
@jreback
Copy link
Contributor

jreback commented Sep 7, 2017

thanks!

note pls have a look at the built docs (may take a bit for it to generate) http://pandas-docs.github.io/pandas-docs-travis/

want to make sure that searching works ok.

Then of course we want to enhance doc-strings where appropriate (which is already an outstanding issue IIRC), if you are interested.

@jreback
Copy link
Contributor

jreback commented Sep 7, 2017

http://pandas-docs.github.io/pandas-docs-travis/api.html#scalars

couple of corrections needed

Timedelta.is_populated should be removed (that's really an internal property. we should renamed it actually to _is_populated)
Timestamp.from_ordinal is not spelled correctly (.fromordinal is the method)
Timdelta.to_pytimedelta misspelling
Timedelta.view, exclude this
Timedelta.delta exclude

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

Successfully merging this pull request may close these issues.

DOC: add Timestamp / Period / Interval to api.rst
3 participants