I have this Dask mask code that sets 3 in a Dask data frame when the value of incol is 1:
ddf['outcol'] = ddf['incol'].mask(ddf['incol'] == 1, 3)
Now, I have to replace the values given 50 conditions such as:
if `incol` == 1 then set 3
if `incol` == 2 then set 8
: : :
: : :
Is it possible to do this in a single Dask statement (doesn't have to be mask)?