-2

I want to access right side of the 2D array. I would like to turn the second column into a 1D array 4883,4967,4968... . I tried doing list_[len(list_),1] however that doesn't work. How would I be able to do that.

list_ = np.array([[   1 4883]
 [   0 4967]
 [   1 4968]
 [   0 4969]
 [   1 4969]
 [   0 4970]
 [   1 4971]
 [   0 4971]
 [   1 4972]
 [   0 4973]
 [   1 4973]
 [   0 4974]
 [   1 4975]
 [   0 4975]
 [   1 4976]])
0

1 Answer 1

1

Simply index as follows -

l[:,1]
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.