Python Forum

Full Version: NumPy array; selecting the a single column
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a numpy array with data. How do I select the first column
my_array =numpy.array([[1,2,3], [1,2,3]])
I can get the first row (1,2,3) by:
first_row = my_array[0]
I simply want a code to give me the first column.