-
Notifications
You must be signed in to change notification settings - Fork 120
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
SNOW-1819523: Add support for expand=True in Series.str.split #2832
Conversation
src/snowflake/snowpark/modin/plugin/compiler/snowflake_query_compiler.py
Outdated
Show resolved
Hide resolved
src/snowflake/snowpark/modin/plugin/compiler/snowflake_query_compiler.py
Outdated
Show resolved
Hide resolved
src/snowflake/snowpark/modin/plugin/compiler/snowflake_query_compiler.py
Outdated
Show resolved
Hide resolved
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.
LGTM, just had a couple questions!
src/snowflake/snowpark/modin/plugin/compiler/snowflake_query_compiler.py
Show resolved
Hide resolved
@@ -16842,6 +16839,12 @@ def output_col( | |||
if np.isnan(n): | |||
# Follow pandas behavior | |||
return pandas_lit(np.nan) | |||
elif n < -1 and not pandas.isnull(pat) and len(str(pat)) > 1: | |||
# Follow pandas behavior, which seems to leave the input column as is |
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.
nit: why seems to
, I thought we should be sure it is or not; are we saying this is not 100% sure? 😆
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.
That's because this behavior is not documented by pandas. So it's just based on our experiments and observations (which are not / cannot be exhaustive). I updated the wording of the comment a little bit though.
Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes SNOW-1819523
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
Add support for expand=True in Series.str.split.