-
Notifications
You must be signed in to change notification settings - Fork 124
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
feat: implement LazyFrame.head for Dask (plus: run tpc-h q2 query with Dask present) #768
Conversation
60465ed
to
d899836
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.
Left couple of comments, didn't check the notebook though 🙃
.github/workflows/extremes.yml
Outdated
python-version: ${{ matrix.python-version }} | ||
- name: Install uv (Unix) | ||
run: curl -LsSf https://astral.sh/uv/install.sh | sh | ||
- name: install-minimu-versions |
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.
Tiny typo
- name: install-minimu-versions | |
- name: install-minimum-versions |
narwhals/_dask/dataframe.py
Outdated
@@ -136,6 +140,11 @@ def with_row_index(self: Self, name: str) -> Self: | |||
def rename(self: Self, mapping: dict[str, str]) -> Self: | |||
return self._from_native_dataframe(self._native_dataframe.rename(columns=mapping)) | |||
|
|||
def head(self: Self, n: int) -> Self: | |||
return self._from_native_dataframe( | |||
self._native_dataframe.head(n=n, compute=False) |
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.
Should we also pass npartititions=-1
to parse all partitions if needed? I am not sure how this works: docs
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.
good points, thanks
thanks for your review! |
I also added
head
to make sure this notebook could rundrive-by:
ibis-framework
install from other notebooks (as we'll no longer benchmark running pandas/dask via ibis anyway)What type of PR is this? (check all applicable)
Related issues
Checklist
If you have comments or can explain your changes, please do so below.