[Tutor] Reading CSVs Was:Matrix Read-in and Inversion

Brian Dorsey brian@dorseys.org
Tue, 4 Sep 2001 14:12:58 -0700


On Tue, Sep 04, 2001 at 04:53:26PM -0400, Rick Pasotto wrote:
> On Tue, Sep 04, 2001 at 12:49:43PM -0700, Sean 'Shaleh' Perry wrote:
> > 
> > On 04-Sep-2001 Robin B. Lake wrote:
> > > I have a 100 x 150 matrix which I want to invert using the
> > > Generalized Inverse capability of MathPy.
> > > 
> > > How might I read this dataset in from either a comma-separated file
> > > or an Excel spreadsheet.  I'm on a Mac G3, OS 8.6.
> > 
> > csv's are easy, just use string.split.
> 
> Not if a quote delimited field has a comma within it. 
> 
I've found the CSV module at the following address quite useful for dealing withoccasionally quoted CSV files (especially from Excell). 

http://object-craft.com.au/projects/csv/

Take care,
-Brian