-
Notifications
You must be signed in to change notification settings - Fork 121
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
docs: let nw.LazyFrame
docstrings examples run on Polars and Dask only
#1700
docs: let nw.LazyFrame
docstrings examples run on Polars and Dask only
#1700
Conversation
narwhals/dataframe.py
Outdated
>>> agnostic_with_row_index(lf_dask).compute() | ||
a b index | ||
0 1 4 0 | ||
1 2 5 1 | ||
2 3 6 2 |
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 try to adjust it so that index comes first?
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 well-spotted! i've opened an issue about it: #1703
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.
Proposed fix in #1706
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.
Let's just wait for #1706 to be merged first, then we can merge this one as well ππΌ
d50b3e1
to
e65d115
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.
seriously awesome, thanks!
narwhals/dataframe.py
Outdated
>>> agnostic_with_row_index(lf_dask).compute() | ||
a b index | ||
0 1 4 0 | ||
1 2 5 1 | ||
2 3 6 2 |
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 well-spotted! i've opened an issue about it: #1703
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.
Amazing work! Thanks a ton @AlessandroMiola
I wonder if we should .collect()
within the agnostic functions so that we don't need to differentiate between compute
and collect
externally. Just a thought π€ Any opinions on it?
Thanks @FBruzzesi! |
faac923
to
6674af0
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.
seriously awesome, thanks @AlessandroMiola and @FBruzzesi for reviewing!
>>> lf | ||
βββββββββββββββββββββββββββββββββββββ | ||
| Narwhals LazyFrame | | ||
|-----------------------------------| | ||
|Dask DataFrame Structure: | | ||
| a b c| | ||
|npartitions=2 | | ||
|0 string int64 int64| | ||
|3 ... ... ...| | ||
|5 ... ... ...| | ||
|Dask Name: frompandas, 1 expression| | ||
|Expr=df | | ||
βββββββββββββββββββββββββββββββββββββ |
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.
nice π
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
Runs
nw.LazyFrame
docstrings examples on Polars and Dask only.