I wanted to count the missing values for the following data using the following command.
df.isnull().sum()
It failed to detect missing values. Then I have used the following command
cols = df.columns
df[cols] = df[cols].apply(pd.to_numeric, errors='coerce')
missing = df.isnull().sum()
print(missing)
It worked , but it also transformed the 'BinaryObject" categorical response variable to NAN as well. If I have categorical variables in multiple columns and missing values are marked as ? or other weird symbol, how can I identify those missing values? I appreciate your suggestions!
