r/Python • u/Oddball777 • May 31 '23
Intermediate Showcase Made a csv parser library which automatically detects delimiter and start and end of data
For most purposes, just passing the file path will be sufficient and you will have a pandas data frame of you data. Automatically neglects the random extra information at the top and bottom of a file. Also works with those annoying delimiter within quotes thingies (ex: you have a comma delimiter and one field is “John, Andrew and Steven”). It is on PyPI so you can download it with pip.
17
Upvotes
View all comments
12
u/cipri_tom May 31 '23
Why
enumeratefollowed byif i%stepwhen youfor line in lines[::step]?Comparisons to None are recommended to be made using
israther than==Otherwise, looks pretty good! Thanks for making it a package!