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-16
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
@@ -541,7 +541,7 @@ The ``rollforward`` and ``rollback`` methods do exactly what you would expect:
541
541
It's definitely worth exploring the ``pandas.tseries.offsets`` module and the
542
542
various docstrings for the classes.
543
543
544
-
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.
544
+
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.
545
545
546
546
547
547
.. ipython:: python
@@ -564,7 +564,7 @@ Parametric offsets
564
564
~~~~~~~~~~~~~~~~~~
565
565
566
566
Some of the offsets can be "parameterized" when created to result in different
567
-
behavior. For example, the ``Week`` offset for generating weekly data accepts a
567
+
behaviors. For example, the ``Week`` offset for generating weekly data accepts a
568
568
``weekday`` parameter which results in the generated dates always lying on a
569
569
particular day of the week:
570
570
@@ -904,7 +904,7 @@ strongly recommended that you switch to using the new offset aliases.
904
904
"ms", "L"
905
905
"us", "U"
906
906
907
-
As you can see, legacy quarterly and annual frequencies are business quarter
907
+
As you can see, legacy quarterly and annual frequencies are business quarters
908
908
and business year ends. Please also note the legacy time rule for milliseconds
909
909
``ms`` versus the new offset alias for month start ``MS``. This means that
910
910
offset alias parsing is case sensitive.
@@ -1158,8 +1158,8 @@ frequency periods.
1158
1158
Note that 0.8 marks a watershed in the timeseries functionality in pandas. In
1159
1159
previous versions, resampling had to be done using a combination of
1160
1160
``date_range``, ``groupby`` with ``asof``, and then calling an aggregation
1161
-
function on the grouped object. This was not nearly convenient or performant as
1162
-
the new pandas timeseries API.
1161
+
function on the grouped object. This was not nearly as convenient or performant
1162
+
as the new pandas timeseries API.
1163
1163
1164
1164
.. _timeseries.periods:
1165
1165
@@ -1197,7 +1197,7 @@ frequency.
1197
1197
1198
1198
p -3
1199
1199
1200
-
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.
1200
+
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.
1201
1201
1202
1202
.. ipython:: python
1203
1203
@@ -1258,7 +1258,7 @@ objects:
1258
1258
ps = Series(randn(len(prng)), prng)
1259
1259
ps
1260
1260
1261
-
``PeriodIndex`` supports addition and subtraction as the same rule as ``Period``.
1261
+
``PeriodIndex`` supports addition and subtraction with the same rule as ``Period``.
1262
1262
1263
1263
.. ipython:: python
1264
1264
@@ -1273,7 +1273,7 @@ objects:
1273
1273
PeriodIndex Partial String Indexing
1274
1274
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1275
1275
1276
-
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>`.
1276
+
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>`.
1277
1277
1278
1278
.. ipython:: python
1279
1279
@@ -1283,7 +1283,7 @@ You can pass in dates and strings to `Series` and `DataFrame` with `PeriodIndex`
1283
1283
1284
1284
ps['10/31/2011':'12/31/2011']
1285
1285
1286
-
Passing string represents lower frequency than `PeriodIndex` returns partial sliced data.
1286
+
Passing a string representing a lower frequency than ``PeriodIndex`` returns partial sliced data.
1287
1287
1288
1288
.. ipython:: python
1289
1289
@@ -1294,15 +1294,15 @@ Passing string represents lower frequency than `PeriodIndex` returns partial sli
1294
1294
dfp
1295
1295
dfp['2013-01-01 10H']
1296
1296
1297
-
As the same as `DatetimeIndex`, the endpoints will be included in the result. Below example slices data starting from 10:00 to 11:59.
1297
+
As with ``DatetimeIndex``, the endpoints will be included in the result. The example below slices data starting from 10:00 to 11:59.
1298
1298
1299
1299
.. ipython:: python
1300
1300
1301
1301
dfp['2013-01-01 10H':'2013-01-01 11H']
1302
1302
1303
1303
Frequency Conversion and Resampling with PeriodIndex
0 commit comments