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

BUG: pd.date_range(...) produces timestamps outside the specified range #10885

Closed
kochede opened this issue Aug 22, 2015 · 2 comments · Fixed by #10887
Closed

BUG: pd.date_range(...) produces timestamps outside the specified range #10885

kochede opened this issue Aug 22, 2015 · 2 comments · Fixed by #10887
Labels
Bug Datetime Datetime data dtype
Milestone

Comments

@kochede
Copy link

kochede commented Aug 22, 2015

Hi Pandas devs!

This call produces 3 timestamps when it has to produce only two:
pd.date_range('2005-01-12 10:00', '2005-01-12 16:00', freq='345min')
this gives:
<class 'pandas.tseries.index.DatetimeIndex'>
[2005-01-12 10:00:00, ..., 2005-01-12 21:30:00]
Length: 3, Freq: 345T, Timezone: None

strangely, for another date function works as expected:
pd.date_range('2005-01-13 10:00', '2005-01-13 16:00', freq='345min')
this gives:
<class 'pandas.tseries.index.DatetimeIndex'>
[2005-01-13 10:00:00, 2005-01-13 15:45:00]
Length: 2, Freq: 345T, Timezone: None

Could you please take a look? Thanks!

Pandas versions:

INSTALLED VERSIONS

commit: None
python: 2.7.9.final.0
python-bits: 64
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 30 Stepping 5, GenuineIntel
byteorder: little
LC_ALL: None
LANG: en_US

pandas: 0.15.2
nose: 1.3.4
Cython: 0.22
numpy: 1.9.2
scipy: 0.15.1
statsmodels: 0.6.1
IPython: 3.0.0
sphinx: 1.2.3
patsy: 0.3.0
dateutil: 2.4.1
pytz: 2015.2
bottleneck: None
tables: 3.1.1
numexpr: 2.3.1
matplotlib: 1.4.3
openpyxl: 1.8.5
xlrd: 0.9.3
xlwt: 0.7.5
xlsxwriter: 0.6.7
lxml: 3.4.2
bs4: 4.3.2
html5lib: None
httplib2: None
apiclient: None
rpy2: None
sqlalchemy: 0.9.9
pymysql: None
psycopg2: None

@jorisvandenbossche jorisvandenbossche added Bug Datetime Datetime data dtype labels Aug 22, 2015
@jorisvandenbossche
Copy link
Member

I can confirm this with master

@kochede
Copy link
Author

kochede commented Aug 22, 2015

wow, that was fast. thanks.

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