Filter and assignment || Filter and concat - not able to produce the desired result. #1499
-
This topic is from 1494 I am trying to replicate a pandas syntax but unable to succeed with Vaex. (Datafarme['A'])[(Dataframe['A'] == '')] = (Datafarme['B'])[(Dataframe['A'] == '')] I am trying to fill the empty rows on Column A with values from Column B when row values in column A is empty. Same syntax in vaex gives an error "Expression" does not support item assignment Alternative: You have passed in an object for which we cannot determine a fingerprint Both column A and B are string. Is it possible to achieve the above goal through Vaex? **NOTE ** The solution suggested in the issue 1494 will not produce the result what I am looking for. Join will only give the row count of my df1 (plus any duplicate rows) with additional columns from df2. But, I was referring to concatenation so I can get back the same no of rows as the original data frame. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I found the solution myself, DF['A]= DF.func.where(DF.A == '', DF.B, DF.A) |
Beta Was this translation helpful? Give feedback.
I found the solution myself,
DF['A]= DF.func.where(DF.A == '', DF.B, DF.A)