Substitua Nan em pandas
df['DataFrame Column'] = df['DataFrame Column'].fillna(0)
Dark Duck
df['DataFrame Column'] = df['DataFrame Column'].fillna(0)
pandas.DataFrame.fillna(0)
data["Gender"].fillna("No Gender", inplace = True)
df.fillna(df.mean())
For one column using pandas:
df['DataFrame Column'] = df['DataFrame Column'].fillna(0)
# axis=1 means fillna by rows
df = df.fillna(axis=1, method='backfill')
df = df.fillna(axis=1, method='ffill')
# methods
# pad / ffill: propagate last valid observation forward to next valid.
# backfill / bfill: use next valid observation to fill gap.