I have a df pretty much big...around 360 rows and 4000 cols. I have the needs to find out the way to iterate over rows and columns to check if the value of each cell is bigger / smaller of +/- 1. In this case I would like to replace the cell with 0 or Nan.
I tried with:
for idx,row in switz_fund_ret.iloc[1:, 1:3631].iterrows():
for col in row:
if col > 1:
switz_fund_ret.drop(idx,inplace=True)
but I received:
KeyError: '[datetime.datetime(2006, 12, 4, 0, 0)] not found in axis'