I would guess that df3 is a dataframe with column 'diff' with int or float dtype. In that case, as nilamo pointed out with 3), its similar to iterating over list of numbers and your "changes" do not propagate into your dataframe column.
Iterating over serie/dataframe is only rarely needed, using subsetting(indexing) or .apply() is preferred (if possible). You can use subsetting with condition and assign new value directly:
Iterating over serie/dataframe is only rarely needed, using subsetting(indexing) or .apply() is preferred (if possible). You can use subsetting with condition and assign new value directly:
df3['diff'][df3['diff'] < 0] = NaN # I suppose that you did "from numpy import *"