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
The bins of the grouping are adjusted based on the beginning of the day of the time series starting point. This works well with frequencies that are multiples of a day (like `30D`) or that divide a day evenly (like `90s` or `1min`). This can create inconsistencies with some frequencies that do not meet this criteria. To change this behavior you can specify a fixed Timestamp with the argument ``origin``.
1797
+
1798
+
For example:
1799
+
1800
+
.. ipython:: python
1801
+
1802
+
start, end ='2000-10-01 23:30:00', '2000-10-02 00:30:00'
1803
+
middle ='2000-10-02 00:00:00'
1804
+
rng = pd.date_range(start, end, freq='7min')
1805
+
ts = pd.Series(np.arange(len(rng)) *3, index=rng)
1806
+
ts
1807
+
1808
+
Here we can see that, when using ``origin`` with its default value (``'start_day'``), the result after ``'2000-10-02 00:00:00'`` are not identical depending on the start of time series:
Here we can see that, when setting ``origin`` to ``'epoch'``, the result after ``'2000-10-02 00:00:00'`` are identical depending on the start of time series:
0 commit comments