Best way to use Excel Data

Hi,

I am an novice-intermediate user of python (I took a 1 semester course in scientific programming with python). I wanted to know what the best way is to manipulate, analyze, and plot Microsoft Excel data. The methods I’ve looked into:

  1. Save data in CSV file and use csv.dictreader to create a dictionary. I actually couldn’t figure this one out.

  2. Read the CSV and extract the numerical data into an array of floats so I can manipulate the data. This is alright but then I lose the text for the header row.

I have a fairly large biological data set, but I also really just want to practice with a good method. Any advice is much appreciated. Thanks!

-Jahan

Jahan Mohiuddin

University of North Carolina at Chapel Hill, 2010

Cell: (516) 480-4825

You could use the python package xlrd, available at
http://www.lexicon.net/sjmachin/xlrd.htm

From what I remember the documentation wasn't all that great, but you should be able to access your data without too much trouble.

Regards,
Jo�o Silva

···

On 10/07/2010 05:11 PM, Jahan Mohiuddin wrote:

Hi,

I am an novice-intermediate user of python (I took a 1 semester course
in scientific programming with python). I wanted to know what the best
way is to manipulate, analyze, and plot Microsoft Excel data. The
methods I've looked into:

1. Save data in CSV file and use csv.dictreader to create a dictionary.
I actually couldn't figure this one out.

2. Read the CSV and extract the numerical data into an array of floats
so I can manipulate the data. This is alright but then I lose the text
for the header row.

I have a fairly large biological data set, but I also really just want
to practice with a good method. Any advice is much appreciated. Thanks!

-Jahan

You may want to look at this as well:

http://matplotlib.sourceforge.net/api/mlab_api.html?highlight=csv#matplotlib.mlab.csv2rec

Mike

···

On 10/07/2010 01:04 PM, Jo�o Lu�s Silva wrote:

On 10/07/2010 05:11 PM, Jahan Mohiuddin wrote:

Hi,

I am an novice-intermediate user of python (I took a 1 semester course
in scientific programming with python). I wanted to know what the best
way is to manipulate, analyze, and plot Microsoft Excel data. The
methods I've looked into:

1. Save data in CSV file and use csv.dictreader to create a dictionary.
I actually couldn't figure this one out.

2. Read the CSV and extract the numerical data into an array of floats
so I can manipulate the data. This is alright but then I lose the text
for the header row.

I have a fairly large biological data set, but I also really just want
to practice with a good method. Any advice is much appreciated. Thanks!

-Jahan

You could use the python package xlrd, available at
http://www.lexicon.net/sjmachin/xlrd.htm

  From what I remember the documentation wasn't all that great, but you
should be able to access your data without too much trouble.

Regards,
Jo�o Silva

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2& L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

And these examples:

  http://matplotlib.sourceforge.net/search.html?q=codex+csv2rec

JDH

···

On Thu, Oct 7, 2010 at 12:27 PM, Michael Droettboom <mdroe@...86...> wrote:

You may want to look at this as well:

http://matplotlib.sourceforge.net/api/mlab_api.html?highlight=csv#matplotlib.mlab.csv2rec

Hi,

a strong advice from someone who is using excel format with tons of data is
to save them in csv and then import in Sqlite.

Excel messes up the data types and gives a lot of troubles with numbers.
Sqlite is fast and data are secure.
The power of this system is that you can query your data and plot what you
need for example.

I can share with you my script to import from csv to sqlite if you want.

Jahan Mohiuddin wrote:

···

Hi,

I am an novice-intermediate user of python (I took a 1 semester course
in scientific programming with python). I wanted to know what the
best way is to manipulate, analyze, and plot Microsoft Excel data.
The methods I've looked into:

1. Save data in CSV file and use csv.dictreader to create a
dictionary. I actually couldn't figure this one out.

2. Read the CSV and extract the numerical data into an array of
floats so I can manipulate the data. This is alright but then I lose
the text for the header row.

I have a fairly large biological data set, but I also really just want
to practice with a good method. Any advice is much appreciated.
Thanks!

-Jahan

Jahan Mohiuddin
University of North Carolina at Chapel Hill, 2010
Cell: (516) 480-4825

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
View this message in context: http://old.nabble.com/Best-way-to-use-Excel-Data-tp29908079p29926020.html
Sent from the matplotlib - users mailing list archive at Nabble.com.