-
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
feat: Series.hist #1859
base: main
Are you sure you want to change the base?
feat: Series.hist #1859
Conversation
wow, amazing!
agree, good design decision here, I think it would be quite awkward to add Expr.hist because:
Hi @mscolnick - just wanted to check that Series.hist would still be useful to you? |
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.
Thanks a ton @camriddell ! I left a couple of comments and will go through the arrow implementation in more details later today π
from pandas import Categorical | ||
from pandas import cut |
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.
We should use self.__native_namespace__()
here as well in place of pandas. I can see that cudf
has a cut
function, as well as modin
import pyarrow as pa | ||
import pyarrow.compute as pc |
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.
These are now imported on the top of the file anyway
import pyarrow as pa | |
import pyarrow.compute as pc |
What type of PR is this? (check all applicable)
Related issues
narwhals.Expr.hist
Β #1561Checklist
If you have comments or can explain your changes, please do so below
Narwhals Expressions do not yet allow one to return a DataFrame (or a struct), so
.hist
is only implemented at the Series level to be compliant with the rest of the API.The PyArrow implementation can likely be streamlined a bit more, so a review on that section would be appreciated.