0

Here I have the PISA scores of each country. I've turned it into a data frame: here are a few rows of this data frame. The problem is that the score values are not in numeric form; they are strings. I need them in numeric form. I've tried a few methods like pd.to_numeric but they didn't work. When I tried pd.to_numeric, it raised this error ValueError: Unable to parse string ".." at position 27

How can I solve this? PS: The score column is the column 2015[YR2015]

Country Name    Country Code    Series Name Series Code 2013 [YR2013]   2014 [YR2014]   2015 [YR2015]
0   Albania ALB PISA: Mean performance on the mathematics scale LO.PISA.MAT ..  ..  413.157
1   Albania ALB PISA: Mean performance on the mathematics scale. Female LO.PISA.MAT.FE  ..  ..  417.750029482799
2   Albania ALB PISA: Mean performance on the mathematics scale. Male   LO.PISA.MAT.MA  ..  ..  408.545458736189
3   Albania ALB PISA: Mean performance on the reading scale LO.PISA.REA ..  ..  405.2588
4   Albania ALB PISA: Mean performance on the reading scale. Female LO.PISA.REA.FE  ..  ..  434.639625546737
5   Albania ALB PISA: Mean performance on the reading scale. Male   LO.PISA.REA.MA  ..  ..  375.75919916958
6   Albania ALB PISA: Mean performance on the science scale LO.PISA.SCI ..  ..  427.225
7   Albania ALB PISA: Mean performance on the science scale. Female LO.PISA.SCI.FE  ..  ..  439.442962901842
8   Albania ALB PISA: Mean performance on the science scale. Male   LO.PISA.SCI.MA  ..  ..  414.957643727778
  • try and copy paste the ```score``` column clearly so that we can see it's values and we can come up with the solution. I can't see the ```score``` column in the output above – sophocles Dec 02 '20 at 10:42
  • do you read them from a file? you can specify dtype for specific column(s) or converters. – buran Dec 02 '20 at 10:47
  • The score column is 2015[yr2015] that is the score column – Atilla Colak Dec 02 '20 at 11:04

0 Answers0