spacepaste

  1.  
  2. df['other'] = np.where((df["k1 [1]"].isnull() & df["k1 [2]"].isnull() & df["k1 [3]"].isnull() & df["k1 [4]"].isnull() & df["k1 [5]"].isnull()) == True, 0, 1)
  3. df['other'] = np.where(functools.reduce(operators.and_, (lambda x: df["k1 [{}]".format(x)].isnull() for x in (1, 2, 3, 4, 5))) == True, 0, 1)
  4.