replacing nan in a column with zero in pandas datafrme code example Example: pandas replace nan data["Gender"].fillna("No Gender", inplace = True)