title: why condition for my dataframe is not working?
body: <p>Here is the code:</p>
  <pre><code>    import pandas as pd
      import numpy as np
      df1=pd.DataFrame({'0':[1,0,11,0],'1':[0,11,4,0]})
      print(df1.head(5))
      df2 = df1.copy()
      columns=list(df2.columns)
      print(columns)
      
      for i in columns:
          idx1 = np.where((df2[i]&gt;0) &amp; (df2[i] &lt; 10))
          df2.loc[idx1] = 1
          idx3 = np.where(df2[i] == 0)
          df2.loc[idx3] = 0       
          idx2 = np.where(df2[i] &gt; 10)
          df2.loc[idx2] = 0
      
      
      print(df2.head(5))
    output:
      0   1
  0   1   0
  1   0  11
  2  11   4
  3   0   0
  ['0', '1']
     0  1
  0  1  1
  1  0  0
  2  0  0
  3  0  0
  </code></pre>
  <p>the concerning part is:
  (idx1 = np.where((df2[i]&gt;0) &amp; (df2[i] &lt; 10))
  df2.loc[idx1] = 1,
  why this logic isn't working?)
  According to this logic, this is what needs to be my output:</p>
  <pre><code>expected:
         0  1
      0  1  1
      1  0  0
      2  0  1
      3  0  0
  </code></pre>