[CALUG] Reading CSV using Python / PHP

Michael Orlitzky michael at orlitzky.com
Thu Apr 28 17:43:47 EDT 2016


On 04/28/2016 10:36 AM, Rajiv Gunja wrote:
> Hey all, I am trying to cut down on the amount of manual steps I have to
> take editing CSV file - sorting, creating new tabs and categorising them.
> 
> ...
> 
> Problem: 
> 1. CSV file has 2000+ rows
> 2. Some columns are multi-line with \r and \n
> 3. fields are separated by "," and each data item is between quotes (" ")
> 

Load the CSV file into SQLite, and then use queries to insert, sort, or
select rows. There are GUI database managers if that makes things
easier. Or if you're not comfortable with SQLite, try LibreOffice Calc
instead -- it comes with its own GUI.




More information about the CALUG mailing list