pandas replace specific values in column with nan using indices code example
Example 1: replace "-" for nan in dataframe
df.replace(np.nan,0)
Example 2: replace all nan values in dataframe
# Replacing all nan values with 0 in Dataframe
df = df.fillna(0)