> How about two dictionaries, each containing the same tuples for
> values? If you create a tuple first, then add it to both dicts, you
> won't have any space-wasting duplicates.
Thanks guys.
--
https://mail.python.org/mailman/listinfo/python-list
On Mon, 18 Nov 2013 02:03:38 +, "Joseph L. Casale"
wrote:
I have a need for a script to hold several tuples with three
values, two text
strings and a lambda. I need to index the tuple based on either of
the two
strings. Normally a database would be ideal but for a
self-contained script
> Not entirely sure I understand you, can you post an example?
>
> If what you mean is that you need to locate the function (lambda) when
> you know its corresponding strings, a dict will suit you just fine.
> Either maintain two dicts for the two separate strings (eg if they're
> "name" and "loca
On Sunday, November 17, 2013 9:03:38 PM UTC-5, Joseph L. Casale wrote:
> I have a need for a script to hold several tuples with three values, two text
> strings and a lambda. I need to index the tuple based on either of the two
> strings. Normally a database would be ideal but for a self-contained
On Mon, Nov 18, 2013 at 1:03 PM, Joseph L. Casale
wrote:
> I have a need for a script to hold several tuples with three values, two text
> strings and a lambda. I need to index the tuple based on either of the two
> strings. Normally a database would be ideal but for a self-contained script
> that
On 2013-11-18 02:03, Joseph L. Casale wrote:
> I have a need for a script to hold several tuples with three
> values, two text strings and a lambda. I need to index the tuple
> based on either of the two strings. Normally a database would be
> ideal but for a self-contained script that's a bit much
I have a need for a script to hold several tuples with three values, two text
strings and a lambda. I need to index the tuple based on either of the two
strings. Normally a database would be ideal but for a self-contained script
that's a bit much.
Before I re-invent the wheel, are there any built-
On 7/20/05, Cyril Bazin <[EMAIL PROTECTED]> wrote:
> The question of the type of the data sutructure depends of your use of the
> data.
> You could avoid some confusion without naming your columns "lines"...
Yes, that is because they are "plant lines", that is why is called "lines" :)
> Anyway
The question of the type of the data sutructure depends of your use of the data.
You could avoid some confusion without naming your columns "lines"...
Anyway, here is a piece of code that read the file and count the star on the fly:
(The result is a dict of dict of int.)
On 20 Jul 2005 11:51:56 -0700, Graham Fawcett <[EMAIL PROTECTED]> wrote:
> You get the idea: model the data in the way that makes it most useable
> to you, and/or most efficient (if this is a large data set).
I don't think this could be called a large dataset (about 40Kb all the file).
It would b
181 and Line RHA801.
Okay. I think what will drive your data-structure question is the way
that you intend to use the data. Conceptually, it will always be 3D, no
matter how you model it, but trying to make a "3D data structure" is
probably not what is most efficient for your application.
On 20 Jul 2005 10:47:50 -0700, Graham Fawcett <[EMAIL PROTECTED]> wrote:
> # zip is your friend here. It lets you iterate
> # across your line names and corresponding values
> # in parallel.
This zip function is new to me, the only zip I knew was pkzip :). So
will read about it.
--
On 20 Jul 2005 10:47:50 -0700, Graham Fawcett <[EMAIL PROTECTED]> wrote:
> This looks a lot like 2D data (row/column), not 3D. What's the third
> axis? It looks, too, that you're not really interested in storage, but
> in analysis...
I think it as 3D like this:
1st axis: [MARKER]Name, like TDF1,
Sebastian Bassi wrote:
> 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:
>
[snip]
This looks a lot like 2D data (row/column), not 3D. What's the third
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,,,*,*,*
,,
15 matches
Mail list logo