Ask Your Question
1

adjacency matrix import

asked 2012-10-26 23:16:58 +0100

LewisEGilbert gravatar image

I am working on a social network analysis of sustainability staff at a large research university in the mid-west. I would like to keep track of my networks using a spreadsheet which will include information about connections (undirected or directed graphs) and information about the nodes (e.g. labels and groups).

Has anyone built scripts that will import generic csv files (or even better .xls or .numbers files)?

if I am being incredibly naive, please point me to the appropriate enlightenment.

thanks, Lewis E Gilbert

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-10-27 04:07:01 +0100

benjaminfjones gravatar image

There is a module in the python standard library for reading/writing files in CSV format. See http://docs.python.org/library/csv.html for details. There are also robust python modules called xlrd and xlwt for reading/writing Excel spreadsheets. See the related question:

http://ask.sagemath.org/question/537/...

edit flag offensive delete link more

Comments

You can also find some code for importing from a CSV file simply at: http://ask.sagemath.org/question/1842/how-to-plot-data-from-a-file

calc314 gravatar imagecalc314 ( 2012-10-27 09:05:28 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-10-26 23:16:58 +0100

Seen: 957 times

Last updated: Oct 27 '12