Skip to content
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

Avoid loading file into memory in read_csv #778

Merged
merged 3 commits into from
Apr 27, 2024

Conversation

scottgigante
Copy link
Contributor

agate.from_csv reads the entire csv file into memory twice before actually reating a Table. This PR keeps things as iterators so that the file is only loaded line by line as we create the table, unless sniff_limit is None in which case the file is loaded into memory upfront.

agate.from_csv reads the entire csv file into memory _twice_ before actually reating a Table. This PR keeps things as iterators so that the file is only loaded line by line as we create the table, unless `sniff_limit` is None in which case the file is loaded into memory upfront.
Copy link
Member

@jpmckinney jpmckinney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments and errors in workflows.

agate/table/from_csv.py Show resolved Hide resolved
agate/table/from_csv.py Show resolved Hide resolved
@jpmckinney jpmckinney merged commit a1fe7e6 into wireservice:master Apr 27, 2024
20 checks passed
@jpmckinney
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants