-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add shift
method
#461
Add shift
method
#461
Conversation
after = 0 | ||
|
||
def _divisions(self): | ||
return self.frame.divisions |
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.
I think divisions change in shift? Not totally sure
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.
Hmm, not sure either. At least in dask.dataframe shift(..) doesn't change.
In [3]: df = pd.DataFrame({'v3': range(5), 'id6': [1, 2, 3, 2, 1]})
In [4]: ddf = dd.from_pandas(df, npartitions=2)
In [5]: ddf.shift(periods=2).divisions
Out[5]: (0, 3, 4)
In [6]: ddf.divisions
Out[6]: (0, 3, 4)
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.
you can do ddf.shift(periods=2).enforce_runtime_divisions()
to see if the divisions are working as expected
dask_expr/_expr.py
Outdated
|
||
@functools.cached_property | ||
def _meta(self): | ||
return self.frame._meta |
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.
meta_nonempty
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.
39446e0
to
86aa3f5
Compare
86aa3f5
to
bac6c18
Compare
thx |
No description provided.