Is there a difference between:
np.exp(some_pandas_series.cumsum())
and
some_pandas_series.cumsum().apply(np.exp)
?
I would use the first form since it’s shorter but in a book I am reading, the author uses the second form. I tried both on some toy data and they seem to produce the same result. However, the author is an absolute expert so I am wondering why he went with the longer, second form?
2