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: Add linspace range behavior to the timeseries/timedeltas/interval docs #21114

Merged
merged 3 commits into from
May 22, 2018

Conversation

jschendel
Copy link
Member

Follow-up to #21009

timeseries.rst:

  • Added documentation for linspace behavior of date_range

timedeltas.rst:

  • Cleaned up timedelta_range documentation for the standard behavior
  • Added documentation for linspace behavior of timedelta_range

advanced.rst:

  • Added documentation for the standard behavior of interval_range
  • Added documentation for linspace behavior of interval_range

@jschendel jschendel added the Docs label May 18, 2018
@jschendel jschendel added this to the 0.23.1 milestone May 18, 2018
@codecov
Copy link

codecov bot commented May 18, 2018

Codecov Report

Merging #21114 into master will increase coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #21114      +/-   ##
==========================================
+ Coverage   91.83%   91.84%   +<.01%     
==========================================
  Files         153      153              
  Lines       49497    49505       +8     
==========================================
+ Hits        45456    45466      +10     
+ Misses       4041     4039       -2
Flag Coverage Δ
#multiple 90.23% <ø> (ø) ⬆️
#single 41.88% <ø> (-0.01%) ⬇️
Impacted Files Coverage Δ
pandas/core/reshape/reshape.py 99.78% <0%> (-0.22%) ⬇️
pandas/core/indexes/multi.py 94.99% <0%> (-0.09%) ⬇️
pandas/core/frame.py 97.22% <0%> (-0.01%) ⬇️
pandas/core/accessor.py 98.71% <0%> (ø) ⬆️
pandas/core/indexes/base.py 96.68% <0%> (+0.04%) ⬆️
pandas/core/common.py 92.09% <0%> (+0.08%) ⬆️
pandas/core/series.py 94.12% <0%> (+0.1%) ⬆️
pandas/util/testing.py 84.81% <0%> (+0.21%) ⬆️

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 6cc5f23...e6864b5. Read the comment docs.


pd.timedelta_range(start='1 days', end='5 days')

pd.timedelta_range( end='10 days', periods=4)
Copy link
Member

Choose a reason for hiding this comment

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

Small nit: There's an extra space between the left parenthesis and end pd.timedelta_range( end=...)

Copy link
Member Author

@jschendel jschendel May 18, 2018

Choose a reason for hiding this comment

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

thanks, fixed

@mroeschke
Copy link
Member

Small comment otherwise LGTM.

Copy link
Contributor

@jreback jreback 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. just some minor comments. merge when looking good.

@@ -924,6 +924,51 @@ bins, with ``NaN`` representing a missing value similar to other dtypes.

pd.cut([0, 3, 5, 1], bins=c.categories)

If we need intervals on a regular frequency, we can use the :func:`interval_range` function
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 a sub-section here

@@ -363,13 +363,44 @@ or ``np.timedelta64`` objects. Passing ``np.nan/pd.NaT/nat`` will represent miss
pd.TimedeltaIndex(['1 days', '1 days, 00:00:05',
np.timedelta64(2,'D'), datetime.timedelta(days=2,seconds=2)])

Similarly to ``date_range``, you can construct regular ranges of a ``TimedeltaIndex``:
Similar to ``date_range``, you can construct regular ranges of a ``TimedeltaIndex``
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 :func: to these

@@ -363,13 +363,44 @@ or ``np.timedelta64`` objects. Passing ``np.nan/pd.NaT/nat`` will represent miss
pd.TimedeltaIndex(['1 days', '1 days, 00:00:05',
np.timedelta64(2,'D'), datetime.timedelta(days=2,seconds=2)])

Similarly to ``date_range``, you can construct regular ranges of a ``TimedeltaIndex``:
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe make a sub-section here

@jschendel jschendel merged commit 90c2237 into pandas-dev:master May 22, 2018
jorisvandenbossche pushed a commit to jorisvandenbossche/pandas that referenced this pull request Jun 8, 2018
…l docs (pandas-dev#21114)

* DOC: Add linspace range behavior to the timeseries/timedeltas/interval docs
(cherry picked from commit 90c2237)
jorisvandenbossche pushed a commit that referenced this pull request Jun 9, 2018
…l docs (#21114)

* DOC: Add linspace range behavior to the timeseries/timedeltas/interval docs
(cherry picked from commit 90c2237)
david-liu-brattle-1 pushed a commit to david-liu-brattle-1/pandas that referenced this pull request Jun 18, 2018
…l docs (pandas-dev#21114)

* DOC: Add linspace range behavior to the timeseries/timedeltas/interval docs
@jschendel jschendel deleted the doc-linspace branch June 22, 2018 17:14
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.

3 participants