We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a2f178f commit 8e05f7eCopy full SHA for 8e05f7e
pandas/io/parsers.py
@@ -350,6 +350,9 @@ def _validate_nrows(nrows):
350
def _read(filepath_or_buffer, kwds):
351
"Generic reader of line files."
352
encoding = kwds.get('encoding', None)
353
+ if encoding is not None:
354
+ encoding = re.sub('_', '-', encoding).lower()
355
+ kwds['encoding'] = encoding
356
357
# If the input could be a filename, check for a recognizable compression
358
# extension. If we're reading from a URL, the `get_filepath_or_buffer`
0 commit comments