Hi, I’m using DataFramesMeta and having trouble with wrangling with missing values.
df = DataFrame(x = 1:5, y = [missing, 4, missing, 2, 1])
x | y | |
---|---|---|
Int64 | Int64? | |
1 | 1 | missing |
2 | 2 | 4 |
3 | 3 | missing |
4 | 4 | 2 |
5 | 5 | 1 |
I want to create a new column that sums over x and y.
df2 = @transform(df, z = sum(skipmissing([:x, :y])))
I thought the skipmissing feature would help out here, but struggling to make it work. Any tips?