I need to generate a column that depends on the previous value of that column. The formula would be something like this:
active customers t = actives customers in t-1 + hires in t - cancelations in t
The data set I have has the new hirings and cancelation column and the cumulative active policies is my desired output.
Both scala or python alternatives are welcome! Thanks!!
