I\'ve checked out map, apply, mapapply, and combine, but can\'t seem to find a simple way of doing the following:
I have a dataframe with 10 columns. I need to pass thre
If it is a really simple function, such as one based on simple arithmetic, chances are it can be vectorized. For instance, a linear combination can be made directly from the columns:
df["d"] = w1*df["a"] + w2*df["b"] + w3*["c"]
where w1,w2,w3 are scalar weights.