-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
Conversation
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
doc/source/timedeltas.rst
Outdated
|
||
pd.timedelta_range(start='1 days', end='5 days') | ||
|
||
pd.timedelta_range( end='10 days', periods=4) |
There was a problem hiding this comment.
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=...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, fixed
Small comment otherwise LGTM. |
There was a problem hiding this 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.
doc/source/advanced.rst
Outdated
@@ -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 |
There was a problem hiding this comment.
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
doc/source/timedeltas.rst
Outdated
@@ -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`` |
There was a problem hiding this comment.
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``: |
There was a problem hiding this comment.
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
…l docs (pandas-dev#21114) * DOC: Add linspace range behavior to the timeseries/timedeltas/interval docs (cherry picked from commit 90c2237)
…l docs (pandas-dev#21114) * DOC: Add linspace range behavior to the timeseries/timedeltas/interval docs
Follow-up to #21009
timeseries.rst
:date_range
timedeltas.rst
:timedelta_range
documentation for the standard behaviortimedelta_range
advanced.rst
:interval_range
interval_range