-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
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: resample by BusinessHour raises ValueError #12351
Comments
hmm, not really sure this business hour has a lot of tests. |
I found some glitch on business hour resampling during write a test for this. will open another issue when I finish investigating. |
Working on this at PyCon. |
Hi guys, this problem was solved? I'm facing same issue here. |
@romulomadu I'm working on it. |
thx @scari , good luck! |
Is there any update on this issue? I ran into it and would like to know when the fix will be released. |
@tylerwmarrs you are welcome to contribute a patch |
I digged into a bit and found that
resample
byBusinessHour
ran into here since the offset is neither string norTick
:https://github.com/pydata/pandas/blob/master/pandas/tseries/resample.py#L999
normalize
in_get_range_edges
cut the time parts off from the offset so it causes the exception.If I modify the line into following, the
resample
goes smoothly:If I made wrong approach, please point me out. I'll make a PR with test.
Reproducible code
Traceback
INSTALLED VERSIONS
commit: 8f1a318
python: 3.4.4.final.0
python-bits: 64
OS: Darwin
OS-release: 15.0.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: ko_KR.UTF-8
LANG: ko_KR.UTF-8
pandas: 0.18.0rc1+8.g8f1a318.dirty
nose: 1.3.7
pip: 7.1.2
setuptools: 19.2
Cython: 0.23.4
numpy: 1.10.2
scipy: 0.16.0
statsmodels: 0.6.1
xarray: None
IPython: 4.0.0
sphinx: 1.3.1
patsy: 0.4.0
dateutil: 2.4.2
pytz: 2015.7
blosc: None
bottleneck: 1.0.0
tables: 3.2.2
numexpr: 2.4.4
matplotlib: 1.4.3
openpyxl: 2.2.6
xlrd: 0.9.4
xlwt: 1.0.0
xlsxwriter: 0.7.7
lxml: 3.4.4
bs4: 4.4.1
html5lib: None
httplib2: 0.9.1
apiclient: None
sqlalchemy: 1.0.9
pymysql: None
psycopg2: None
jinja2: 2.8
The text was updated successfully, but these errors were encountered: