I am probably doing something very simple, but I cant figure out the trick there.
I have a dataframe, and I want to replace the values in a particular column that exceed a value from zero with some random value. I had thought this was a way of achieving this:
self.dfile['foo'] = np.where(self.dfile['foo'] >= 0, random.uniform(4, 9), self.dfile['foo'])
It seems to be giving the same random value across all values that exceed 0. How do I get different values?