Say I have the following:
import numpy as np data = np.array([ [1,2,3], [1,2,3], [1,2,3], [4,5,6], ])
How do I change the values โโin column 3 based on the values โโin column 2? For example, if column 3 == 3, column 2 = 9.
[[1,9,3], [1,9,3], [1,9,3], [4,5,6]]
I looked at np.any() , but I cannot figure out how to change the array in place.
source share