A dataframe or time series with annual averages when used by science and engineering applications is often normalised. This means that the 29th. Februray is removed from the data series.
A util function for this purpose would be helpful.
Tags: Enhancement, timeseries, low-priority
Comment From: sinhrks
Because required normalization depends on use-cases (exclude holidays, etc), using property access should be simpler.
idx = pd.date_range('2016-02-01', '2016-03-01', freq='D')
idx
# DatetimeIndex(['2016-02-01', '2016-02-02', '2016-02-03', '2016-02-04',
# '2016-02-05', '2016-02-06', '2016-02-07', '2016-02-08',
# '2016-02-09', '2016-02-10', '2016-02-11', '2016-02-12',
# '2016-02-13', '2016-02-14', '2016-02-15', '2016-02-16',
# '2016-02-17', '2016-02-18', '2016-02-19', '2016-02-20',
# '2016-02-21', '2016-02-22', '2016-02-23', '2016-02-24',
# '2016-02-25', '2016-02-26', '2016-02-27', '2016-02-28',
# '2016-02-29', '2016-03-01'],
# dtype='datetime64[ns]', freq='D')
idx[~((idx.day == 29) & (idx.month == 2))]
# DatetimeIndex(['2016-02-01', '2016-02-02', '2016-02-03', '2016-02-04',
# '2016-02-05', '2016-02-06', '2016-02-07', '2016-02-08',
# '2016-02-09', '2016-02-10', '2016-02-11', '2016-02-12',
# '2016-02-13', '2016-02-14', '2016-02-15', '2016-02-16',
# '2016-02-17', '2016-02-18', '2016-02-19', '2016-02-20',
# '2016-02-21', '2016-02-22', '2016-02-23', '2016-02-24',
# '2016-02-25', '2016-02-26', '2016-02-27', '2016-02-28',
# '2016-03-01'],
# dtype='datetime64[ns]', freq=None)
If the separate function is actually needed, please provide detailed spec.