I dont understand why my column allHoldingsFund['ratioBest'] is not converting into numeric?
Initially i replaced empty rows with the number 0 but int 0 and floats numbers did not make the column allHoldingsFund['ratioBest'] easily convertible to numeric (got error TypeError: len() of unsized object). Now I left empty rows as they are and forced the floats to convert to numeric but it did not work- allHoldingsFund['ratioBest'] is is still an object. See below
allHoldingsFund['ratioBest']
Out[170]:
100
144
187 0.520704845814978
264
386
494
597
635 2.790492957746479
allHoldingsFund['ratioBest']=pd.to_numeric(allHoldingsFund['ratioBest'], errors='coerce')
Name: ratioBest, Length: 1664, dtype: object
Any help is appreciated
Thanks