title: inplace apply to columns of pandas dataframe satisfying conditions
body: <p>Consider the following pandas dataframe:</p>
  
  <pre><code>df = pd.DataFrame({'t': [1,2,3], 'x1': [4,5,6], 'x2': [7,8,9]} )
  
  &gt;&gt;&gt; print(df)
  t  x1  x2
  0  1   4   7
  1  2   5   8
  2  3   6   9
  </code></pre>
  
  <p>I would like to apply a function (say multiplying by 2) to those columns with names containing the character 'x'</p>
  
  <p>This can be done by:</p>
  
  <pre><code>df.filter(regex='x').apply(lambda c: 2*c)
  </code></pre>
  
  <p>but not in place.  My solution is:</p>
  
  <pre><code>tmp = df.filter(regex='x')
  tmp = tmp.apply(lambda c: 2*c)
  tmp['t'] = df['t']
  df = tmp
  </code></pre>
  
  <p>which has the added problem of changing the order of the columns.  Is there a better way?    </p>