Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas read float numbers with coma

In [ 9]: import locale

In [10]: from locale import atof

In [11]: locale.setlocale(locale.LC_NUMERIC, '')
Out[11]: 'en_GB.UTF-8'

In [12]: df.applymap(atof)
Out[12]:
      0        1
0  1200  4200.00
1  7000    -0.03
2     5     0.00
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pandas #read #float #numbers #coma
ADD COMMENT
Topic
Name
4+3 =