title: Divide multiple columns by another column in pandas error
body: <p>I have a dataframe with 12 columns. I want to divide each column (except the first and the last one) by the last column. </p>
  
  <p>The code below is not working: </p>
  
  <pre><code>df.iloc[:,1:-2].div(df.lastcolumn,axis=0)
  </code></pre>
  
  <p>The error is:</p>
  
  <pre><code>unsupported operands types for /: float and instance method.
  </code></pre>
  
  <p>I have  a couple of Nan values and 0 values in all columns of my dataframe.</p>
  
  <p>The dataype of each column is float.</p>
  
  <p>Thanks</p>