-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
I can't convert 1H OHLC data into monthly data with a specific time by loffset #19422
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
Comments
please show a reproducible example |
@TomAugspurger Let's make it simpler. If I am resampling from 1 hour to 1 month, is it possible to specify a base with a different unit such as hours? |
Let us know if you can make an example, http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports |
see reproducible example below:
Adding the |
Uh oh!
There was an error while loading. Please reload this page.
#13218
#13933
With regard to the above issues, I have the same problem. I need to convert 1 hour to monthly data, the requirement is that I need to set the beginning time interval to 17:00.
ohlc_dict = {'open':'first', 'high':'max', 'low':'min', 'close': 'last'}
df = df.resample('1M', loffset='17H',closed='left',label='left').agg(ohlc_dict)
I specified the time by
loffset='17H
' already, it just changed time label to 17:00, but it still took the Open Price from 00:00 instead of 17:00. What can I do to the get open price at 17:00 instead of 00:00? Thanks.The text was updated successfully, but these errors were encountered: