← Back to team overview

larry-discuss team mailing list archive

Re: Label indexing

 

On Mon, Feb 8, 2010 at 10:05 AM, Keith Goodman <kwgoodman@xxxxxxxxx> wrote:
> After a long thread on how to support label indexing in larry, here's
> where we ended up:
>
> 1. Remove the indexing of labels by strings from the trunk.
>
> 2. Create a method larry.lix that can be used for label indexing like this:
>
> lar.lix['a']
> lar.lix['a':]
> lar.lix[:, 'a']
> lar.lix['a', 'b', 'c':]

I'm not sure what the last index means, if there are several labels
for the same axis, they would need to be in a list_like
lar.lix[['a', 'b', 'c'], :]   to distinguish different elements for
one axis from elements for several axis.

Josef

>
> Only labels and slices are allowed. Inside the function the labels
> will be converted to indices and then a call will be made to
> lar[converted_index].
>
> 3. Indexing with more than one list will do rectangular indexing, not
> fancy indexing.
>
> OK, that's it. I'll start. I'll need help with #3
>
> _______________________________________________
> Mailing list: https://launchpad.net/~larry-discuss
> Post to     : larry-discuss@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~larry-discuss
> More help   : https://help.launchpad.net/ListHelp
>



Follow ups

References