a = pandas.DataFrame(np.arange(25, dtype=np.float16).reshape(5, 5))
a.values[3, 2] = np.NaN
b = pandas.DataFrame(np.arange(1000, 1025, dtype=np.float16).reshape(5, 5))
a[np.isnan(a)] = b[np.isnan(a)]
a
How to merge two dataframe in pandas to replace nan