title: setting values in a pandas dataframe using loc - multiple selection criteria allowing setting value in a different column
body: <p>I have a database with multiple columns and rows.  I want to locate within the database rows that meet certain criteria of a subset of the columns  AND if it meets that criteria change the value of a different column in that same row.</p>
  <p>I am prototyping with the following database</p>
  <pre><code>df = pd.DataFrame([[1, 2], [4, 5], [5, 5], [5, 9], [55, 55]], columns=['max_speed', 'shield'])
  df['frcst_stus'] = 'current'
  df
  </code></pre>
  <p>which gives the following result:</p>
  <pre><code>max_speed   shield  frcst_stus
  0   1   2   current
  1   4   5   current
  2   5   5   current
  3   5   9   current
  4   55  55  current
  </code></pre>
  <p>I want to change index row 2 to read 5, 5, 'hello'  without changing the rest of the dataframe.</p>
  <p>I can do the examples in the Pandas.loc documentation at setting values.  I can set a row, a column, and rows matching a callable condition.  But the call is on a single column or series.  I want two.</p>
  <p>And I have found a number of stackoverflow answers that answer the question using loc on a single column to set a value in a second column.  That's not my issue.  I want to search two columns worth of data.</p>
  <p>The following allows me to get the row I want:</p>
  <pre><code>result = df[(df['shield'] == 5) &amp; (df['max_speed'] == 5) &amp; (df['frcst_stus'] == 'current')]
  </code></pre>
  <p>And I know that just changing the equal signs (== 'current') to (= 'current') gives me an error.</p>
  <p>And when I select on two columns I can set the columns (see below), but both columns get set.  ('arghh')  and when I try to test the value of 'max_speed' I get a false is not in index error.</p>
  <pre><code>df.loc[:, ['max_speed', 'frcst_stus']] = 'hello'
  </code></pre>
  <p>I also get an error trying to explain the boolean issues with Python.  Frankly, I just don't understand the whole overloading yet.</p>