get a column from numpy array code example
Example 1: print column in 2d numpy array
import numpy as np
x=np.arange(25).reshape(5,5)
print(x)
#print(x[:,index_of_column_you_need])
print(x[:,3])
Example 2: extract column numpy array python
# Extract/ Slice only the 3rd column from the numpy array
print(a2[:,[2]])
Example 3: how to extract column from numpy array
print(a2[:,[2]])