NumPy array; selecting the a single column - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Data Science (https://python-forum.io/forum-44.html) +--- Thread: NumPy array; selecting the a single column (/thread-5847.html) |
NumPy array; selecting the a single column - econmajor - Oct-24-2017 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. |