Skip to content
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

DatetimeIndex behaves inconsistently when start and end have different precisions #9907

Closed
ptrcarta opened this issue Apr 15, 2015 · 1 comment
Labels
Bug Datetime Datetime data dtype
Milestone

Comments

@ptrcarta
Copy link

When creating a DatetimeIndex where start has a greater precision than end for a given frequency the output DatetimeIndex will be shorter than expected

>>>pd.__version__
0.15.2-318-g549b72f


>>>pd.DatetimeIndex(start='2015-04-15 00:00:03', end='2016-04-22 00:00:04', freq='Q')
2015-06-30 00:00:03
2015-09-30 00:00:03
2015-12-31 00:00:03
2016-03-31 00:00:03


>>>pd.DatetimeIndex(start='2015-04-15 00:00:03', end='2016-04-22 00:00', freq='Q')
2015-06-30 00:00:03
2015-09-30 00:00:03
2015-12-31 00:00:03


>>>pd.DatetimeIndex(start='2015-04-15 00:00:03', end='2015-6-22 00:00:04', freq='W')
2015-04-19 00:00:03
2015-04-26 00:00:03
2015-05-03 00:00:03
2015-05-10 00:00:03
2015-05-17 00:00:03
2015-05-24 00:00:03
2015-05-31 00:00:03
2015-06-07 00:00:03
2015-06-14 00:00:03
2015-06-21 00:00:03


>>>pd.DatetimeIndex(start='2015-04-15 00:00:03', end='2015-6-22 00:00', freq='W')
2015-04-19 00:00:03
2015-04-26 00:00:03
2015-05-03 00:00:03
2015-05-10 00:00:03
2015-05-17 00:00:03
2015-05-24 00:00:03
2015-05-31 00:00:03
2015-06-07 00:00:03
2015-06-14 00:00:03
@jreback
Copy link
Contributor

jreback commented Jun 30, 2015

closed by #10422

@jreback jreback closed this as completed Jun 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Datetime Datetime data dtype
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants