Say I had a series such as: [1,2, NAN, 4] If I did: series.apply(lambda a: a+2) I would get an error due to the NAN. Is there an elegant way to preserve the NANs while applying my change?