Skip to content

created normed time info #1337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
timmie opened this issue May 29, 2012 · 1 comment
Closed

created normed time info #1337

timmie opened this issue May 29, 2012 · 1 comment

Comments

@timmie
Copy link
Contributor

timmie commented May 29, 2012

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

@sinhrks
Copy link
Member

sinhrks commented Jul 24, 2016

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.

@sinhrks sinhrks closed this as completed Jul 24, 2016
@sinhrks sinhrks modified the milestones: No action, Someday Jul 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants