I am trying to cast a string values in a dataframe series into floats. I tried using to_numeric() and astype() functions, but when I check after the type of a series element it gives me string again. I am using NYC SAT Scores Dataset
Here is my code:
avg_crit_read["SAT Critical Reading Avg. Score"].astype('float')
type(avg_crit_read["SAT Critical Reading Avg. Score"][0])
Another issue I encountered using this dataset is some columns that suppose to have numbers they have letters instead. For example, for "SAT Critical Reading Avg. Score" I have value 's' as well as values 279,300 etc.. I planned to replace these letters with the mean score of the rest columns. If anyone has experience with this datasets it can be useful to share of knows something about value "s".