title: How to set a value in a pandas DataFrame by mixed iloc and loc
body: <p>Say I want a function that changes the value of a named column in a given row number of a DataFrame.<br>
  One option is to find the column's location and use iloc, like that:  </p>
  
  <pre><code>def ChangeValue(df, rowNumber, fieldName, newValue):
      columnNumber = df.columns.get_loc(fieldName)
      df.iloc[rowNumber, columnNumber] = newValue
  </code></pre>
  
  <p>But I wonder if there is a way to use the magic of iloc and loc in one go, and skip the manual conversion.  </p>
  
  <p>Any ideas?</p>