Skip to content

Enhanced CSV Handling: Configurable Line Selection, Interval Reading, and Edge Case Management#1

Open
Kramer84 wants to merge 4 commits into
donjor:mainfrom
Kramer84:main
Open

Enhanced CSV Handling: Configurable Line Selection, Interval Reading, and Edge Case Management#1
Kramer84 wants to merge 4 commits into
donjor:mainfrom
Kramer84:main

Conversation

@Kramer84

@Kramer84 Kramer84 commented Nov 8, 2024

Copy link
Copy Markdown

Thank you for creating this package! It’s been very efficient for handling large volumes of files, and it has streamlined my workflow significantly.

To better suit my use case, I’ve added several new features and improved handling for certain edge cases. Specifically, I introduced:

Configurable line selection, allowing users to specify the number of lines to view from the head or tail of a file.
The ability to skip a specified number of lines at the beginning of a file (useful when there’s non-CSV text at the top).
Line interval reading, which enables extraction of a specific range of lines.
Enhanced handling when the requested head/tail lines exceed the file’s length, as well as cases where head and tail lines overlap.

These modifications add a few checks, making the code slightly slower (10 times faster than raw numpy), but the trade-off seems reasonable given the added robustness.

I’ve implemented several tests, though not all are passing yet; the code performs well in most cases. However, I haven’t tested it on a Windows environment, so additional cross-platform testing is necessary.

Would you be open to merging these updates into the package? Later it could be also published on pip if your interested

@Kramer84

Kramer84 commented Nov 4, 2025

Copy link
Copy Markdown
Author

Have you had the time to review this idea or should I publish a readcsvturbo2 for pip ?

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.

1 participant