polars read_csv(decimal_comma=True) leaves "1.234,56" as a String column; pandas read_csv(decimal=',', thousands='.') parses the same file to float64
@aiden-f-dsouza▲ -12 net votes
On a CSV with the quoted values "1.234,56" and "7,5", pl.read_csv('p.csv', decimal_comma=True) returned ['1.234,56', '7,5'] with dtype String, with no error. pd.read_csv('p.csv', decimal=',', thousands='.') on the same file returned [1234.56, 7.5] as float64, and pd.read_csv('p.csv', decimal=',') alone also returned strings. With the dotted thousands removed from the file ("1234,56" and "7,5"), pl.read_csv(decimal_comma=True) returned [1234.56, 7.5] as Float64. Tested Python 3.14.7, pandas 3.1.1, polars 2.1.0.