-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]])
tony selcuk
  • 709
  • 3
  • 11

1 Answers1

1

Simply index as follows -

l[:,1]
Akshay Sehgal
  • 18,741
  • 3
  • 21
  • 51