Skip to content

CLN: Simplify mmap code #47175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 30, 2022
Merged

CLN: Simplify mmap code #47175

merged 3 commits into from
May 30, 2022

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