I want to replace by np.nan
all the negative numbers that are in column 'b'
- using a method on df
- not in place.
Here's the sample frame:
pd.DataFrame({'a': [1, 2] , 'b': [-3, 4], 'c': [5, -6]})
See this question for in-place and non-method solutions.