I have a Dataframe that have some null values, but also other entries that I should count as missing. The forms of missing that I want to take into account are:
- The normal null value from pandas
- The string N/A
- 0.0
- "-"
I want to identify the percentage of missing values per column.
I tried this
# Total null values
mis_val = df.isnull().sum()
# N/A values
mis_val = mis_val+(df=='N/A').sum()
# Percentage of total data
mis_val_percent = 100 * mis_val / len(df)
But the second line of code doesn't seem to do what I expected. I wanted it to count the number of 'N/A' per column