Skip to content

Commit 4f271f0

Browse files
Backport PR pandas-dev#39492: DOC: Document how encoding errors are handled (pandas-dev#39552)
Co-authored-by: Torsten Wörtwein <[email protected]>
1 parent faf4012 commit 4f271f0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pandas/io/parsers.py

+5
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,11 @@
325325
Encoding to use for UTF when reading/writing (ex. 'utf-8'). `List of Python
326326
standard encodings
327327
<https://docs.python.org/3/library/codecs.html#standard-encodings>`_ .
328+
.. versionchanged:: 1.2
329+
330+
When ``encoding`` is ``None``, ``errors="replace"`` is passed to
331+
``open()``. Otherwise, ``errors="strict"`` is passed to ``open()``.
332+
This behavior was previously only the case for ``engine="python"``.
328333
dialect : str or csv.Dialect, optional
329334
If provided, this parameter will override values (default or not) for the
330335
following parameters: `delimiter`, `doublequote`, `escapechar`,

0 commit comments

Comments
 (0)