-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: read_csv fails with float_precision="round_trip" and decimal="," #35365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This might trace back to here pandas/pandas/_libs/src/parser/tokenizer.c Line 1788 in 3e88e17
I don't know if / how PyOS_string_to_double can accept a custom separator but if you can make it work and want to push a PR would be welcome |
ales-erjavec
added a commit
to ales-erjavec/pandas
that referenced
this issue
Jul 22, 2020
In case of non c-locale decimal and tsep, copy and fixup the source string before passing it to PyOS_string_to_double
ales-erjavec
added a commit
to ales-erjavec/pandas
that referenced
this issue
Jul 22, 2020
In case of non c-locale decimal and tsep, copy and fixup the source string before passing it to PyOS_string_to_double
This was referenced Jul 22, 2020
ales-erjavec
added a commit
to ales-erjavec/pandas
that referenced
this issue
Jul 22, 2020
In case of non c-locale decimal and tsep, copy and fixup the source string before passing it to PyOS_string_to_double
ales-erjavec
added a commit
to ales-erjavec/pandas
that referenced
this issue
Jul 22, 2020
In case of non c-locale decimal and tsep, copy and fixup the source string before passing it to PyOS_string_to_double
3 tasks
ales-erjavec
added a commit
to ales-erjavec/pandas
that referenced
this issue
Jul 23, 2020
In case of non c-locale decimal and tsep, copy and fixup the source string before passing it to PyOS_string_to_double
ales-erjavec
added a commit
to ales-erjavec/pandas
that referenced
this issue
Jul 23, 2020
In case of non c-locale decimal and tsep, copy and fixup the source string before passing it to PyOS_string_to_double
ales-erjavec
added a commit
to ales-erjavec/pandas
that referenced
this issue
Jul 27, 2020
In case of non c-locale decimal and tsep, copy and fixup the source string before passing it to PyOS_string_to_double
ales-erjavec
added a commit
to ales-erjavec/pandas
that referenced
this issue
Aug 10, 2020
In case of non c-locale decimal and tsep, copy and fixup the source string before passing it to PyOS_string_to_double
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
Code Sample, a copy-pastable example
Problem description
read_csv fails if using
float_precision="round_trip"
anddecimal=","
(or any other decimal and thousands separator).It raises an
Expected Output
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : None
python : 3.7.4.final.0
python-bits : 64
OS : Darwin
OS-release : 18.7.0
machine : x86_64
processor : i386
byteorder : little
LC_ALL : en_US.UTF-8
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.0.5
numpy : 1.16.2
pytz : 2018.3
dateutil : 2.6.1
pip : 20.1.1
setuptools : 39.0.1
Cython : 0.29.13
pytest : 3.7.1
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : 1.1.5
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : 6.2.1
pandas_datareader: None
bs4 : 4.6.0
bottleneck : 1.2.1
fastparquet : None
gcsfs : None
lxml.etree : None
matplotlib : 3.3.0
numexpr : 2.6.6
odfpy : None
openpyxl : 3.0.2
pandas_gbq : None
pyarrow : None
pytables : None
pytest : 3.7.1
pyxlsb : None
s3fs : None
scipy : 1.1.0
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : 1.1.0
xlwt : None
xlsxwriter : 1.1.5
numba : 0.41.0
The text was updated successfully, but these errors were encountered: