-
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-1883796: Support appending of same size Column to Dataframe #2869
Comments
@rhaffar would you mind sharing a code example of what you would like to get supported. I don't completely understand why |
@sfc-gh-aalam So here is an arbitrary example of the solution I've currently implemented, given a target dataframe, and a need to transform some set of columns for this dataframe.
Given something like this, say I have 200 columns to transform, I cannot compute the new columns concurrently (even though I already have all the source columns in the original target_dataframe) - I must compute them entirely sequentially. Trying to compute them with a multi-threaded solution would lead to race conditions. My idea was to instead do something like following:
Where the |
What is the current behavior?
Apologies if I'm just missing something in the docs, but currently, there seems to be no way to append a Column to a Dataframe.
What is the desired behavior?
To have some method of appending Column objects to Dataframes. The main motive for me here is to have something approaching parallelism when generating multiple columns with the
with_columns
operations. If we can append columns to dataframes, then that lets us generate the new columns from a dataframe separately in parallel, leaving only the appending of the new columns to be done sequentially. This can be done with joins as well, but I imagine directly appending a column should be much less expensive. Only consideration here is order would have to be maintained.How would this improve
snowflake-snowpark-python
?The text was updated successfully, but these errors were encountered: