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

Added docstring for Expr.is_null #87

Merged
merged 2 commits into from
May 6, 2024
Merged

Conversation

ugohuche
Copy link
Contributor

@ugohuche ugohuche commented May 5, 2024

No description provided.

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks @ugohuche ! Just got a suggestion


>>> def func(df_any):
... df = nw.from_native(df_any)
... df = df.with_columns(nw.all().is_null()) # nan != null for polars
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about showing:

...     df = df.with_columns(
...         a_is_null = nw.col('a').is_null(),
...         b_is_null = nw.col('b').is_null(),
...     )

, so that the output is easier to reason about?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that makes more sense. I'll add it in the next pull request

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! can you add it to this one please? if you make your change, add and commit them, and push them to this branch, then this pull request will be automatically updated

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I've updated the branch now

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome work @ugohuche !

@MarcoGorelli MarcoGorelli merged commit a3d20aa into narwhals-dev:main May 6, 2024
13 checks passed
@ugohuche ugohuche deleted the is_null branch May 8, 2024 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants