Closed
Description
Pandas version checks
- I have checked that the issue still exists on the latest versions of the docs on
main
here
Location of the documentation
Documentation problem
The default encoding is not mentioned for read_csv
.
I tried finding it in the source code, and I'm not sure I followed it correctly, but it looks like it's ultimately specified in pandas.io.common.get_handle()
:
Lines 697 to 698 in b7708f0
Defaulting to UTF-8 differs from open()
, which could be surprising.
The default encoding is platform dependent (whatever
locale.getencoding()
returns)
(But that's not to say it's a bad thing. UTF-8 is a fine default.)
Suggested fix for documentation
Mention the default encoding, i.e. UTF-8. Or, if it's documented elsewhere, add a link.