title: Efficiently replace values from a column to another column Pandas DataFrame
body: <p>I have a Pandas DataFrame like this: </p>
  
  <pre><code>   col1 col2 col3
  1   0.2  0.3  0.3
  2   0.2  0.3  0.3
  3     0  0.4  0.4
  4     0    0  0.3
  5     0    0    0
  6   0.1  0.4  0.4
  </code></pre>
  
  <p>I want to replace the <code>col1</code> values with the values in the second column (<code>col2</code>) only if <code>col1</code> values are equal to 0, and after (for the zero values remaining),  do it again but with the third column (<code>col3</code>). The Desired Result is the next one:</p>
  
  <pre><code>   col1 col2 col3
  1   0.2  0.3  0.3
  2   0.2  0.3  0.3
  3   0.4  0.4  0.4
  4   0.3    0  0.3
  5     0    0    0
  6   0.1  0.4  0.4
  </code></pre>
  
  <p>I did it using the <code>pd.replace</code> function, but it seems too slow.. I think must be a faster way to accomplish that. </p>
  
  <pre><code>df.col1.replace(0,df.col2,inplace=True)
  df.col1.replace(0,df.col3,inplace=True)
  </code></pre>
  
  <p>is there a faster way to do that?, using some other function instead of the <code>pd.replace</code> function?</p>