title: Move non-empty cells to the left in pandas DataFrame
body: <p>Suppose I have data of the form</p>
  
  <pre><code>Name    h1    h2    h3    h4
  A       1     nan   2     3
  B       nan   nan   1     3
  C       1     3     2     nan
  </code></pre>
  
  <p>I want to move all non-nan cells to the left (or collect all non-nan data in new columns) while preserving the order from left to right, getting</p>
  
  <pre><code>Name    h1    h2    h3    h4
  A       1     2     3     nan
  B       1     3     nan   nan
  C       1     3     2     nan
  </code></pre>
  
  <p>I can of course do so row by row. But I hope to know if there are other ways with better performance.</p>