[SciPy-user] compare two csv files
Mon Jan 28 15:11:03 CST 2008
Hi to all,
sorry for the bad question... actually I might be in the
At the beginning I thought, that I only have to compare two
columns with numbers in it, but now the two columns could
So the result should be a list with entries, which exist in
both lists like '1'.
A little bit more difficult would be two lists with number
E.g. the lists could look like:
The searching/comparing should produce two lists; one with
the 'double' fuzzy entries like '123.test' and '123.Test'.
Would be nice, if anyone can help!?
Andrew Straw schrieb am 01/24/2008 10:18 PM:
> Hi Fabian, this is not a direct answer to your question, but you also
> may be intrested in matplotlib's mlab.csv2rec() which automatically
> creates a recordarray from a csv file. John Hunter and I, to much lesser
> degree, have been hacking on this to work for us. Please feel free to
> check its suitability for your purposes.
> Fabian Braennstroem wrote:
>> I would like to compare two csv file; actually two columns
>> from two csv files.
>> I would use something like:
>> def read_test():
>> start = time.clock()
>> reader = csv.reader( file('data.txt') )
>> data = [ map(float, row) for row in reader ]
>> data = array(data, dtype = float)
>> To get my data into an array.
>> Does anyone have an idea, how to compare the two columns?
>> Would be nice!
>> SciPy-user mailing list
More information about the SciPy-user