fill na with the non null elelment code example Example: how to replace nan values with 0 in pandas df.fillna(0)