code: def drop_if(df, fun):
      
  
      def _filter_f(col):
          try:
              return fun(df[col])
          except:
              return False
  
      cols = list(filter(_filter_f, df.columns))
      return df.drop(cols, axis=1)
docs: Drops columns where fun(ction) is true
      Args:
          fun: a function that will be applied to columns