I have some data in a csv file but the decimal separator is ',', as we use in Brazil. I tried to read my file using the read_csv function with the parameter decimal defined as ',' but when I check the type of return, is str and I tough it would be float.
So, what the decimal parameter does? what is the best way to deal with this? should I convert the data manually? I'm using Python 3 and Pandas 0.19.2
Bellow is a data sample and the code I'm using
import pandas as pd
# Get raw data from file
file_name = 'dados.csv'
dados = pd.read_csv(file_name, sep=";", decimal=",", thousands=".")
ANO;COD_SEG;Codi_Saude;COD_UB;MES;SB_CONS;SB_ESCO;SB_TRAT;SB_URGE;SB_GEST;POP;ICONSB;IESCO;IRESOL;IURG
2012;4;10;19712;4;28;164;3;16;0;5274;0,530906333;3,109594236;0,107142857;0,303375047
2012;4;10;19712;5;13;0;6;23;0;5274;0,246492226;0;0,461538462;0,436101631
2012;4;10;19712;6;8;135;7;12;0;5274;0,151687524;2,559726962;0,875;0,227531286
2012;4;10;19712;7;0;0;0;0;0;5274;0;0;;0