pandas blank to nan code example
Example 1: pandas replace nan
data["Gender"].fillna("No Gender", inplace = True)
Example 2: pandas replace empty string with nan
df = df.replace(r'^\s*$', np.NaN, regex=True)
Example 3: python pandas replace nan with null
df.fillna('', inplace=True)