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

Accept rows-with-max-lookback as preceding parameter #1825

Merged
merged 3 commits into from Jun 17, 2019

Conversation

Projects
2 participants
@emilyreff7
Copy link
Contributor

commented Jun 10, 2019

Support row-based trailing windows bound by a maximum look-back period

@emilyreff7 emilyreff7 force-pushed the emilyreff7:maxrows branch from 7737377 to 7d6974f Jun 12, 2019

@cpcloud cpcloud self-assigned this Jun 12, 2019

@cpcloud cpcloud added this to To do in Pandas via automation Jun 12, 2019

@cpcloud cpcloud added this to the Next Feature Release milestone Jun 12, 2019

Show resolved Hide resolved ibis/expr/window.py Outdated

@emilyreff7 emilyreff7 force-pushed the emilyreff7:maxrows branch from 7d6974f to be7e050 Jun 12, 2019

Show resolved Hide resolved ibis/expr/window.py Outdated
Show resolved Hide resolved ibis/expr/window.py Outdated
Show resolved Hide resolved ibis/expr/window.py Outdated
@cpcloud
Copy link
Member

left a comment

Last set of changes, then this is good to merge.

@@ -163,6 +203,12 @@ def _validate_frame(self):
"'how' must be 'rows' or 'range', got {}".format(self.how)
)

if self.max_lookback is not None:
if not isinstance(self.max_lookback, ir.IntervalValue):

This comment has been minimized.

Copy link
@cpcloud

cpcloud Jun 17, 2019

Member

I'll make a follow up for this, but I think we might also want to support passing in pandas.Timedelta objects here.

ibis.trailing_window(
rows_with_max_lookback(3, ibis.interval(days=3))
),
'rows between 3 preceding and current row',

This comment has been minimized.

Copy link
@cpcloud

cpcloud Jun 17, 2019

Member

I'll create a follow up issue for this as well, but I don't think we should implement this for any backends unless we can give it well-defined behavior.

@cpcloud cpcloud merged commit ed0f180 into ibis-project:master Jun 17, 2019

13 checks passed

ci/circleci: python35_test Your tests passed on CircleCI!
Details
ci/circleci: python36_benchmark Your tests passed on CircleCI!
Details
ci/circleci: python36_conda_build Your tests passed on CircleCI!
Details
ci/circleci: python36_docs Your tests passed on CircleCI!
Details
ci/circleci: python36_test Your tests passed on CircleCI!
Details
ci/circleci: python37_conda_build Your tests passed on CircleCI!
Details
ci/circleci: python37_test Your tests passed on CircleCI!
Details
ibis-project.ibis Build #20190617.2 succeeded
Details
ibis-project.ibis (WindowsCondaBuild py36) WindowsCondaBuild py36 succeeded
Details
ibis-project.ibis (WindowsCondaBuild py37) WindowsCondaBuild py37 succeeded
Details
ibis-project.ibis (WindowsTest py35) WindowsTest py35 succeeded
Details
ibis-project.ibis (WindowsTest py36) WindowsTest py36 succeeded
Details
ibis-project.ibis (WindowsTest py37) WindowsTest py37 succeeded
Details

Pandas automation moved this from To do to Done Jun 17, 2019

@emilyreff7 emilyreff7 deleted the emilyreff7:maxrows branch Jun 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.