You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/timeseries.rst
+16-16Lines changed: 16 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -243,7 +243,7 @@ variety of frequency aliases. The default frequency for ``date_range`` is a
243
243
rng = bdate_range(start, end)
244
244
rng
245
245
246
-
``date_range`` and ``bdate_range`` makes it easy to generate a range of dates
246
+
``date_range`` and ``bdate_range`` make it easy to generate a range of dates
247
247
using various combinations of parameters like ``start``, ``end``,
248
248
``periods``, and ``freq``:
249
249
@@ -353,7 +353,7 @@ This specifies an **exact** stop time (and is not the same as the above)
353
353
354
354
dft['2013-1':'2013-2-28 00:00:00']
355
355
356
-
We are stopping on the included end-point as its part of the index
356
+
We are stopping on the included end-point as it is part of the index
357
357
358
358
.. ipython:: python
359
359
@@ -540,7 +540,7 @@ The ``rollforward`` and ``rollback`` methods do exactly what you would expect:
540
540
It's definitely worth exploring the ``pandas.tseries.offsets`` module and the
541
541
various docstrings for the classes.
542
542
543
-
These operations (``apply``, ``rollforward`` and ``rollback``) preserves time (hour, minute, etc) information by default. To reset time, use ``normalize=True`` keyword when create offset instance. If ``normalize=True``, result is normalized after the function is applied.
543
+
These operations (``apply``, ``rollforward`` and ``rollback``) preserves time (hour, minute, etc) information by default. To reset time, use ``normalize=True`` keyword when creating the offset instance. If ``normalize=True``, result is normalized after the function is applied.
544
544
545
545
546
546
.. ipython:: python
@@ -563,7 +563,7 @@ Parametric offsets
563
563
~~~~~~~~~~~~~~~~~~
564
564
565
565
Some of the offsets can be "parameterized" when created to result in different
566
-
behavior. For example, the ``Week`` offset for generating weekly data accepts a
566
+
behaviors. For example, the ``Week`` offset for generating weekly data accepts a
567
567
``weekday`` parameter which results in the generated dates always lying on a
568
568
particular day of the week:
569
569
@@ -806,7 +806,7 @@ strongly recommended that you switch to using the new offset aliases.
806
806
"ms", "L"
807
807
"us", "U"
808
808
809
-
As you can see, legacy quarterly and annual frequencies are business quarter
809
+
As you can see, legacy quarterly and annual frequencies are business quarters
810
810
and business year ends. Please also note the legacy time rule for milliseconds
811
811
``ms`` versus the new offset alias for month start ``MS``. This means that
812
812
offset alias parsing is case sensitive.
@@ -1060,8 +1060,8 @@ frequency periods.
1060
1060
Note that 0.8 marks a watershed in the timeseries functionality in pandas. In
1061
1061
previous versions, resampling had to be done using a combination of
1062
1062
``date_range``, ``groupby`` with ``asof``, and then calling an aggregation
1063
-
function on the grouped object. This was not nearly convenient or performant as
1064
-
the new pandas timeseries API.
1063
+
function on the grouped object. This was not nearly as convenient or performant
1064
+
as the new pandas timeseries API.
1065
1065
1066
1066
.. _timeseries.periods:
1067
1067
@@ -1099,7 +1099,7 @@ frequency.
1099
1099
1100
1100
p -3
1101
1101
1102
-
If ``Period`` freq is daily or higher (``D``, ``H``, ``T``, ``S``, ``L``, ``U``, ``N``), ``offsets`` and ``timedelta``-like can be added if the result can have same freq. Otherise, ``ValueError`` will be raised.
1102
+
If ``Period`` freq is daily or higher (``D``, ``H``, ``T``, ``S``, ``L``, ``U``, ``N``), ``offsets`` and ``timedelta``-like can be added if the result can have the same freq. Otherise, ``ValueError`` will be raised.
1103
1103
1104
1104
.. ipython:: python
1105
1105
@@ -1160,7 +1160,7 @@ objects:
1160
1160
ps = Series(randn(len(prng)), prng)
1161
1161
ps
1162
1162
1163
-
``PeriodIndex`` supports addition and subtraction as the same rule as ``Period``.
1163
+
``PeriodIndex`` supports addition and subtraction with the same rule as ``Period``.
1164
1164
1165
1165
.. ipython:: python
1166
1166
@@ -1175,7 +1175,7 @@ objects:
1175
1175
PeriodIndex Partial String Indexing
1176
1176
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1177
1177
1178
-
You can pass in dates and strings to `Series` and `DataFrame` with `PeriodIndex`, as the same manner as `DatetimeIndex`. For details, refer to :ref:`DatetimeIndex Partial String Indexing <timeseries.partialindexing>`.
1178
+
You can pass in dates and strings to ``Series`` and ``DataFrame`` with ``PeriodIndex``, in the same manner as ``DatetimeIndex``. For details, refer to :ref:`DatetimeIndex Partial String Indexing <timeseries.partialindexing>`.
1179
1179
1180
1180
.. ipython:: python
1181
1181
@@ -1185,7 +1185,7 @@ You can pass in dates and strings to `Series` and `DataFrame` with `PeriodIndex`
1185
1185
1186
1186
ps['10/31/2011':'12/31/2011']
1187
1187
1188
-
Passing string represents lower frequency than `PeriodIndex` returns partial sliced data.
1188
+
Passing a string representing a lower frequency than ``PeriodIndex`` returns partial sliced data.
1189
1189
1190
1190
.. ipython:: python
1191
1191
@@ -1196,15 +1196,15 @@ Passing string represents lower frequency than `PeriodIndex` returns partial sli
1196
1196
dfp
1197
1197
dfp['2013-01-01 10H']
1198
1198
1199
-
As the same as `DatetimeIndex`, the endpoints will be included in the result. Below example slices data starting from 10:00 to 11:59.
1199
+
As with ``DatetimeIndex``, the endpoints will be included in the result. The example below slices data starting from 10:00 to 11:59.
1200
1200
1201
1201
.. ipython:: python
1202
1202
1203
1203
dfp['2013-01-01 10H':'2013-01-01 11H']
1204
1204
1205
1205
Frequency Conversion and Resampling with PeriodIndex
0 commit comments