-
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
chore: factor out check_columns_exist #1792
Conversation
narwhals/utils.py
Outdated
@@ -1059,3 +1059,9 @@ def generate_repr(header: str, native_repr: str) -> str: | |||
"| Use `.to_native` to see native output |\nβ" | |||
f"{'β' * 39}β" | |||
) | |||
|
|||
|
|||
def check_column_exists(columns: list[str], subset: str | list[str] | None) -> None: |
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.
doesn't subset need to be a list here?
def check_column_exists(columns: list[str], subset: str | list[str] | None) -> None: | |
def check_column_exists(columns: list[str], subset: list[str] | None) -> None: |
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.
looks like this is wrong in _spark_like
actually - could you correct that one from
subset: str | list[str] | None = None,
to
subset: list[str] | None = None,
please?
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 @DeaMariaLeon !
as another follow-up, we could show which columns are missing? like
? |
Yeah, sure @MarcoGorelli. Did I close this too soon? π± |
π no i meant in another pr, if you fancy it |
Sure, sure! π |
What type of PR is this? (check all applicable)
Related issues
check_columns_exist
Β #1736Checklist
If you have comments or can explain your changes, please do so below