I have a data-frame:
, overall_score, industry_score
0, 15, -
1, 18, 12
2, - , 1
3, - , -
4, 12, 3
For some reason when I run:
print(df.isnull().sum())
It does not see the '-' as seen in index number 0, 2 and 3 as a nan value, how can I fix this? Because the - does actually mean that there's a missing datapoint.
Result of df.to_dict():
{' overall_score': {0: ' 15', 1: ' 18', 2: ' - ', 3: ' - ', 4: ' 12'}, ' industry_score': {0: ' -', 1: ' 12', 2: ' 1', 3: ' -', 4: ' 3'}}