Skip to content

Conversation

twoertwein
Copy link
Member

The mmap wrapper in pandas/io/common.py had CSV c-engine specific behavior: if mmap is used and encoding="utf-8", then the c-engine can cope with bytes (no need to decode the bytes to str). When pushing this edge case into the c-engine, we can simplify the mmap wrapper a lot!

@jreback jreback added Refactor Internal refactoring of code IO CSV read_csv, to_csv labels May 30, 2022
@jreback jreback added this to the 1.5 milestone May 30, 2022
@jreback jreback merged commit 9292530 into pandas-dev:main May 30, 2022
@jreback
Copy link
Contributor

jreback commented May 30, 2022

thanks @twoertwein very nice

@twoertwein twoertwein deleted the clean_mmap branch June 8, 2022 19:26
yehoshuadimarsky pushed a commit to yehoshuadimarsky/pandas that referenced this pull request Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

IO CSV read_csv, to_csv Refactor Internal refactoring of code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants