Nov-22-2018, 12:10 AM
So just to get to your sample, you can use the below line without a loop should suffice:
df["c"] = (df["b"] - df["a"]) / df["a"]You can also assign the result to a new dataframe:
newDF = (df["b"] - df["a"]) / df["a"]