I\'m working through the \"Python For Data Analysis\" and I don\'t understand a particular functionality. Adding two pandas series objects will automatically align the index
The default approach is to assume that any computation involving NaN gives NaN as the result. Anything plus NaN is NaN, anything divided by NaN is NaN, etc. If you want to fill the NaN with some value, you have to do that explicitly (as Dan Allan showed in his answer).