DOC: read_csv default encoding is not documented

This issue has been created since 2022-11-24.

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

pandas.read_csv

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():

pandas/pandas/io/common.py

Lines 697 to 698 in b7708f0

# Windows does not default to utf-8. Set to utf-8 for a consistent behavior
encoding = encoding or "utf-8"

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.

More Details About Repo
Owner Name pandas-dev
Repo Name pandas
Full Name pandas-dev/pandas
Language Python
Created Date 2010-08-24
Updated Date 2022-12-07
Star Count 36164
Watcher Count 1118
Fork Count 15472
Issue Count 3683

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
Dependency Dashboard 0 2021-08-30 2022-11-30
[Bug] Texture bug when using tinkers construct 1.18.1 3 2022-04-20 2022-10-08
[DatePicker] Trying to type date into DesktopDatePicker automatically fills date based on first character 6 2022-10-25 2022-10-28
[data grid] onRowEditStop is not called when stopRowEditMode is called 2 2022-10-25 2022-10-31
make app a PanicKit Responder for device-wide panic responses 3 2021-12-16 2022-11-15
Flaky-test: KafkaMessageOrderKafkaTest.testKafkaProduceMessageOrder 0 2022-03-11 2022-04-20
Developer guide is outdated 1 2021-01-20 2022-11-17
improve gatekeeper tests 0 2021-01-16 2022-11-26
[BUG] Undefined trying to read wallet address when not signed in 0 2022-11-28 2022-12-01
host filesystem permission should be removed 2 2021-12-29 2022-11-12
Annotation Error 5 2021-10-20 2021-12-20
Trigger validation on both onChange and onBlur 13 2017-12-18 2022-10-06
Use Reflect.construct for calling JS constructors 1 2022-01-31 2022-10-27
Database connection issue when using upper/lower case names. 0 2021-06-27 2022-10-30
go语言高级特性学习 return 404 1 2021-08-31 2022-11-06
searching in marketplace exits with the code 6 50% of the time 1 2021-01-24 2022-11-12
Location of `.pub-cache` 2 2022-03-21 2022-11-25
added multimeters (Voltmeters, Ammeters and Ohmmeters). 0 2020-12-09 2022-11-30
Decoding Error when running Ganache 2.6.0-beta.3 on darwin 0 2021-10-27 2022-09-07
Creating notes from local images 0 2021-01-17 2022-11-11
Support DataAPI.jl metadata API 0 2022-09-20 2022-11-29
Need to improve code review/release process and reduce developer productivity friction 9 2022-10-07 2022-11-29
[enterprise-4.10] Issue in file security/seccomp-profiles.adoc 1 2022-06-15 2022-11-30
[TC-CADMIN-1.15] Read attribute failure even though expected outcome matches 0 2022-08-18 2022-08-23
[beta1.3] ESM support 2 2022-08-04 2022-11-26
Fix the build / exports in package.json 0 2022-05-12 2022-11-26
Change mappingHelpers `objectLookup` from an O(n) array to O(1) Map 0 2022-05-10 2022-12-05
Node.js 12 actions are deprecated 0 2022-10-24 2022-11-04
Selectable input and output directories. 0 2022-10-28 2022-11-04
Bad link in Related Topics -- can't find target 1 2022-05-04 2022-11-29
`ammonia` is also a `synthetic fuel` 6 2021-11-10 2022-08-30
Error with gene order file generation "duplicate row names" 0 2022-08-03 2022-11-20
Extension throws error: Decode(nonaddressable main.MyDecimal) 4 2021-11-07 2022-12-03
Can you enhance the core to support Harmony/Melody cartridge type 1 2021-04-18 2022-01-06
Exception if you try to update a logged model via console 2 2020-12-05 2022-11-12
inspect.getfullargspec in module constructor causes problems with function wrappers 0 2022-11-16 2022-11-25
[BUG] On Fedora, install fails with "KeyError: 'posix_local'" 13 2021-12-27 2022-11-15
[BUG] setuptools>=60 fails to find Python.h on Pyston 1 2021-12-26 2022-10-19
az quota list giving an error 22 2022-05-23 2022-09-19
Use with Sails v1.0 9 2017-10-23 2022-01-16
Support client side rendering for real time analytics 1 2021-09-23 2022-09-10
ffigen4.x 5.x genearted code compile problem 1 2022-05-06 2022-10-24
Add missing fields in the CVE inventory database 0 2022-03-07 2022-11-14
resolves issue #66: remove and ignore staticfiles directory 4 2019-08-30 2022-09-19
Help! wLuna stuck on transfer from Phantom -> MetaMask 1 2021-10-12 2022-09-28
Documentation heavily misleading 1 2020-05-17 2022-11-29
Tabs crash after restart and console throws error about ads service already running 1 2022-06-29 2022-07-02
The updated metrics responses will not be sent to p3a-json.brave.com 0 2022-12-05 2022-12-06
Compilation warnings on OTP 19 0 2016-06-26 2022-11-14
Run ServiceController.Start(serviceName) throw exception access is denied 9 2022-09-13 2022-11-21