How to read columns in python

Dhananjay dhananjay.c.joshi at gmail.com
Tue Feb 24 02:08:29 EST 2009


Well,

The three columns are tab separated and there are 200 such rows having these
3 columns in the file.

First two columns are x and y coordinates and third column is the
corresponding value.

I want to read this file as a matrix in which column1 correspond to row,
column2 corresponds to columns(in matrix) and column3 corresponds to value
in the matrix.



-- Dhananjay



On Tue, Feb 24, 2009 at 12:18 PM, Chris Rebert <clp2 at rebertia.com> wrote:

> On Mon, Feb 23, 2009 at 10:41 PM, Dhananjay <dhananjay.c.joshi at gmail.com>
> wrote:
> > I am bit new to python and programming and this might be a basic
> question:
> >
> > I have a file containing 3 columns.
>
> Your question is much too vague to answer. What defines a "column" for
> you? Tab-separated, comma-separated, or something else altogether?
>
> - Chris
>
> --
> Follow the path of the Iguana...
> http://rebertia.com
>



-- 
--
--------------------------------------------------------------
Dhananjay C Joshi
Project Assistant
Lab of Structural Biology,
C D F D, ECIL Road, Nacharam
Hyderabad-500 076, INDIA
Tel : +91-40-27151344
Fax : +91-40-27155610
--------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090224/b0696d87/attachment-0001.html>


More information about the Python-list mailing list