how to fill value with blank in python dataframe code example
Example 1: pandas replace empty string with nan
df = df.replace(r'^\s*$', np.NaN, regex=True)
Example 2: pandas fill blanks with zero
column.fillna(0, inplace=True)
df = df.replace(r'^\s*$', np.NaN, regex=True)
column.fillna(0, inplace=True)