How to fill the missing value in the addition of Data frame in python?

ipython

#1

I have created two data frame in ipython notebook and perform the addition operation on them.

df1 = DataFrame(np.arange(12.).reshape((3, 4)), columns=list('abcd'))
df2 = DataFrame(np.arange(20.).reshape((4, 5)), columns=list('abcde'))
df1 + df2
a b  c  d  e
0 0  2  4 6  NaN
1 9  11  13 15  NaN
2 18  20  22 24  NaN
3 NaN  NaN  NaN NaN  NaN

I want to know is there are functions by which we can fill the missing in the addition.


#2

@sid100158- You can use the add function on df1 , pass df2 with an argument "fill_value".
fill_value - It helps to fill all missing values with the given value such as if we give zero, it will check all the missing values in df2 and fill it with zero.

Hope this helps!

Regards,
Hinduja