I wrote 2 very similar codes to replace characters (?, .) to nan values in Python. Unfortunately one of them worked perfectly but other did not. Here are the codes
df_train['SES'].replace('?',np.nan, inplace= True)
That worked perfectly, but
df_train['CLUSTER_CODE'].replace('.', np.nan, inplace= True)
this one is very similar code to above, but did not work. Any advice please as i'm very new to python and trying to learn.