Pandas.datetimeindex.snap Timestamps To Left Occurring Frequency
I would like to have the same functionality that snap but using the left occurring frequency instead of the nearest. This is what I am trying: date = pd.date_range('2015-01-01',
Solution 1:
I find the solution in pandas snap source code:
use rollback instead:
from pandas.tseries.frequencies import to_offset
freq = to_offset('W-MON')
date.map(freq.rollback)
Post a Comment for "Pandas.datetimeindex.snap Timestamps To Left Occurring Frequency"