I have a dataset in this format:
I need to import the data and work with it.
The main problem is that the first and the fourth columns are strings while the second and third columns are floats and ints, respectively.
I'd like to put the data in a matrix or at least obtain a list of each column's data.
I tried to read the whole dataset as a string but it's a mess:
f = open ( 'input.txt' , 'r')
l = [ map(str,line.split('')) for line in f ]
What could be a good solution?
See Question&Answers more detail:os