Skip to content

Commit 420eafc

Browse files
fsouzaproost
authored andcommitted
io/parsers: ensure decimal is str on PythonParser (pandas-dev#29743)
1 parent 273265b commit 420eafc

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

doc/source/whatsnew/v1.0.0.rst

+1
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,7 @@ I/O
489489
- Bug in :meth:`Styler.background_gradient` not able to work with dtype ``Int64`` (:issue:`28869`)
490490
- Bug in :meth:`DataFrame.to_clipboard` which did not work reliably in ipython (:issue:`22707`)
491491
- Bug in :func:`read_json` where default encoding was not set to ``utf-8`` (:issue:`29565`)
492+
- Bug in :class:`PythonParser` where str and bytes were being mixed when dealing with the decimal field (:issue:`29650`)
492493
-
493494

494495
Plotting

pandas/io/parsers.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ def _read(filepath_or_buffer: FilePathOrBuffer, kwds):
488488
"cache_dates": True,
489489
"thousands": None,
490490
"comment": None,
491-
"decimal": b".",
491+
"decimal": ".",
492492
# 'engine': 'c',
493493
"parse_dates": False,
494494
"keep_date_col": False,
@@ -568,7 +568,7 @@ def parser_f(
568568
# Quoting, Compression, and File Format
569569
compression="infer",
570570
thousands=None,
571-
decimal=b".",
571+
decimal: str = ".",
572572
lineterminator=None,
573573
quotechar='"',
574574
quoting=csv.QUOTE_MINIMAL,

0 commit comments

Comments
 (0)