Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more
[X] I have checked that this issue has not already been reported.
[X] I have confirmed this bug exists on the latest version of pandas.
[x] I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
import pandas as pd
import io
pd.read_csv(io.StringIO('id\n"1,5"\n'), dtype={'id':pd.Float64Dtype()}, sep=';', decimal=',')
or
import pandas as pd
pd.read_csv("./test.csv", dtype={'id':pd.Float64Dtype()}, sep=';', decimal=',')
where test.csv looks like
id
1,5
Issue Description
I have a semicolon-separated CSV file with a bunch of floats that have decimal separation with comma.
For that setup, when I specify dtype for that column as Float64Dtype(), it fails.
When I specify float from python, it works.
When I use and specify . as a decimal separator, it works.
Expected Behavior
The listed example should parse and result in a float 1.5
Pandas version checks
[X] I have checked that this issue has not already been reported.
[X] I have confirmed this bug exists on the latest version of pandas.
[x] I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
or
where test.csv looks like
Issue Description
I have a semicolon-separated CSV file with a bunch of floats that have decimal separation with comma. For that setup, when I specify
dtype
for that column asFloat64Dtype()
, it fails.When I specify
float
from python, it works. When I use and specify.
as a decimal separator, it works.Expected Behavior
The listed example should parse and result in a float
1.5
Installed Versions