How to store "3D" data? (data structure question)
- From: Sebastian Bassi <sbassi@xxxxxxxxx>
- Date: Wed, 20 Jul 2005 13:50:46 -0300
Hello,
I have to parse a text file (was excel, but I translated to CSV) like
the one below, and I am not sure how to store it (to manipulate it
later).
Here is an extract of the data:
Name,Allele,RHA280,RHA801,RHA373,RHA377,HA383
TDF1,181,,,,,
,188,,,,,
,190,,,,,
,193,*,*,,,
,None,,,*,*,*
,,,,,,
TDF2,1200,*,*,,,*
,None,,,*,*,
,,,,,,
TDF3,236,,,,,
,240,,,,,
,244,*,,*,,*
,252,*,*,,,
,None,,,,*,
,,,,,,
Should I use lists? Dictionary? Or a combination?
The final goal is to "count" how many stars (*) has any "LINE" (a line
is RHA280 for instance).
RHA280 has 1 star in TDF1 and 1 star in TDF2 and 2 stars in TDF3.
I am lost because I do analize the data "line by line" (for Line in
FILE) so it is hard to count by column.
--
<a href="http://www.spreadfirefox.com/?q=affiliates&id=24672&t=1">La
web sin popups ni spyware: Usa Firefox en lugar de Internet
Explorer</a>
.
- Follow-Ups:
- Re: How to store "3D" data? (data structure question)
- From: Graham Fawcett
- Re: How to store "3D" data? (data structure question)
- Prev by Date: Re: python certification
- Next by Date: Re: convert ascii escapes into binary form
- Previous by thread: convert ascii escapes into binary form
- Next by thread: Re: How to store "3D" data? (data structure question)
- Index(es):
Relevant Pages
|