Hi all,
I've got a fairly large (but not huge, 58mb) tab seperated text file, with
approximately 200 columns and 56k rows of numbers and strings.
Here's a snippet of my code to create a numpy matrix from the data file...
data = map(lambda x : x.strip().split('\t'), sys.stdin.readlines())
If the text file has 'numbers and strings' how is numpy meant to know
what dtype to use?
Please try genfromtxt especially if columns contain both numbers and
strings.
Well, I suppose they are all considered to be strings here. I haven't tried
to convert the numbers to floats yet.
What happens
still had the same problem.
On 9/23/09, Christopher Barker chris.bar...@noaa.gov wrote:
Dave Wood wrote:
Well, I suppose they are all considered to be strings here. I haven't
tried to convert the numbers to floats yet.
This could be an issue. For strings, numpy creates an array of strings
for all the emails.
Dave
On 9/23/09, Dave Wood davejw...@gmail.com wrote:
Appologies for the multiple posts, people. My posting to the forum was
pending for a long time, so I deleted it and tried emailing directly. I
didn't think they'd all be sent out.
Gokan, thanks for the reply, I hope you