Re: Select column from a list

2009-09-01 Thread hoffik
Wow, I didn't expect so many answers and possibilities! I'll try to go through it and surely find the best solution for me :jumping: Thank you all! -- View this message in context: http://www.nabble.com/Select-column-from-a-list-tp25185508p25240207.html Sent from the Python - p

Re: Select column from a list

2009-08-29 Thread Aahz
In article , Anthra Norell wrote: >Vlastimil Brom wrote: >> 2009/8/28 hoffik : >>> >>> I'm quite new in Python and I have one question. I have a 2D matrix of >>> values stored in list (3 columns, many rows). I wonder if I can select one >>> column without having to go through the list with 'for'

Re: Select column from a list

2009-08-28 Thread Alan G Isaac
On 8/28/2009 3:45 AM hoffik wrote: > I'm quite new in Python and I have one question. I have a 2D matrix of > values stored in list (3 columns, many rows). I wonder if I can select one > column without having to go through the list with 'for' command. Not quite what you asked but ... >>> rows = [

Re: Select column from a list

2009-08-28 Thread Stephen Fairchild
hoffik wrote: > > Hello, > > I'm quite new in Python and I have one question. I have a 2D matrix of > values stored in list (3 columns, many rows). I wonder if I can select one > column without having to go through the list with 'for' command. > > For example I have list called 'values'. > When

Re: Select column from a list

2009-08-28 Thread Dave Angel
hoffik wrote: Hello, I'm quite new in Python and I have one question. I have a 2D matrix of values stored in list (3 columns, many rows). I wonder if I can select one column without having to go through the list with 'for' command. For example I have list called 'values'. When I write 'values[0

Re: Select column from a list

2009-08-28 Thread Bernhard Voigt
> >> I'm quite new in Python and I have one question. I have a 2D matrix of > >> values stored in list (3 columns, many rows). I wonder if I can select one > >> column without having to go through the list with 'for' command. In case you want to due numerical calculations take a look at numpy it

Re: Select column from a list

2009-08-28 Thread Piet van Oostrum
> hoffik (h) wrote: >h> Hello, >h> I'm quite new in Python and I have one question. I have a 2D matrix of >h> values stored in list (3 columns, many rows). I wonder if I can select one >h> column without having to go through the list with 'for' command. >h> For example I have list called 'v

Re: Select column from a list

2009-08-28 Thread Anthra Norell
Vlastimil Brom wrote: 2009/8/28 hoffik : Hello, I'm quite new in Python and I have one question. I have a 2D matrix of values stored in list (3 columns, many rows). I wonder if I can select one column without having to go through the list with 'for' command. ... I guess, it won't be p

Re: Select column from a list

2009-08-28 Thread Vlastimil Brom
2009/8/28 hoffik : > > Hello, > > I'm quite new in Python and I have one question. I have a 2D matrix of > values stored in list (3 columns, many rows). I wonder if I can select one > column without having to go through the list with 'for' command. > ... I guess, it won't be possible without an ex

Re: Select column from a list

2009-08-28 Thread Bruno Desthuilliers
hoffik a écrit : Hello, I'm quite new in Python and I have one question. I have a 2D matrix of values stored in list (3 columns, many rows). I wonder if I can select one column without having to go through the list with 'for' command. Lists don't have columns. What you have is a list of lists

Re: Select column from a list

2009-08-28 Thread Xavier Ho
On Fri, Aug 28, 2009 at 5:45 PM, hoffik wrote: > Hello, > > I'm quite new in Python and I have one question. I have a 2D matrix of > values stored in list (3 columns, many rows). I wonder if I can select one > column without having to go through the list with 'for' command. As far as I know tho

Select column from a list

2009-08-28 Thread hoffik
te 'values[0]' or 'values[0][:]' I'll get the first row. But when I write 'values[:][0]' I won't get the first column, but the first row again! I can't see why. Thanks Hoffik -- View this message in context: http://www.nabble.com/Select-column-from-a-li