numpy multidimensional array slice dimension code example
Example 1: numpy 2d slicing
print(a2[:, 1]) # [2, 5, 8]
Example 2: numpy how to slice individual columns
X = data[:, [1, 9]]
print(a2[:, 1]) # [2, 5, 8]
X = data[:, [1, 9]]