-
Notifications
You must be signed in to change notification settings - Fork 590
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: Fix wrong row indexing in the result for 'window after filter' for timecontext adjustment #2696
BUG: Fix wrong row indexing in the result for 'window after filter' for timecontext adjustment #2696
Conversation
| # re-indexing index to count from 0 | ||
| subset = subset.reset_index(drop=True).reset_index() | ||
| subset = subset.reset_index(drop=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure we need this
04cef7f
to
841dd3e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. can you add a whatsnew note.
|
@LeeTZ can you merge master one more time |
|
@jreback thanks I rebased and checks are green now, also added release note |
|
lgtm @LeeTZ can you merge master and ping on green. |
|
@jreback Sure all green now |
|
thanks @LeeTZ |
Overview
When time context is adjusted, the result of 'window after filer' is wrong for pandas backend. This PR fixes the bug.
Example:
The result looks like:
Note that there are many
NaNrows. This is because indexes for the result series are misaligned. Caused byreset_indexin time context trimming.Another minor change in this PR is to rename
trim_with_timecontextto betrim_window_series. The method is used to trim the resulting series of window execution only. The method name should not sound that general.Test
A new test is added for this case in
ibis/backends/test/test_timecontext.py