Merge non nil values from one column into other #299
Unanswered
dan-corneanu
asked this question in
Q&A
Replies: 1 comment
-
This will work but we should add convenient API for df.assign(:adjusted_availability) { Arrow::Function.find(:coalesce).execute([df.adjustment.data, df.availability.data]) } |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I have the following dataframe
and I would like to add a new column
:adjusted_availability
thatshould take the value of
:adjustment
if not nil, otherwise thevalue of
:availability
.The result should look like
My solution was the following
Is there a more performant or more idiomatic way to achieve this result?
Beta Was this translation helpful? Give feedback.
All reactions