[Tutor] import data (txt/csv) into list/array and manipulation

Tim Michelsen timmichelsen at gmx-topmail.de
Mon Nov 10 23:58:13 CET 2008

> filetype(2) The other file contains signal data in three columns, column one
> is a unique identifier type int, and the other two columns contain two type
> int values (genomic location reference values)
>   ** import this as array/list
> I want to map the location of filetype(2) with respect to filetype(1) and be
> able to do averaging of signal if I align all filetype one objects.
> Thanks

import numpy as np

data = np.loadtxt('file.csv', dtype='|S10')
col1 = date[0]
col2 = date[1].astype(int)

More information about the Tutor mailing list