I have a numeric variable (stored as object) where one single value is "NA", how could I replace this with a zero? Thanks!
df['Var_A'].loc[28:35]
28 2.99
29 7.81
30 "NA"
31 13.55
32 8.25
33 6.2
34 8.77
35 2.67
Name: Var_A, dtype: object
df['Var_A'].replace("NA", 0)df['Var_A'].replace("NA", 0).astype(float)orpd.to_numeric(df['Var_A'], errors='coerce')