title: How to collapse multiple columns pandas
body: <p>I have data like so and am using pandas/excel/python.</p>
  <pre><code>A     B     C     D
  Bus        Car
  Plane
                   Car
       Boat  Car 
       Boat  Car   Plane
  </code></pre>
  <p>I'm trying to get my data like so:</p>
  <pre><code>A     B     C     D
  Bus  Car
  Plane
  Car
  Boat Car
  Boat Car  Plane 
  </code></pre>
  <p>Where values (strings) get shifted over depending on if the cell is blank.</p>
  <p>I've looked into df.max but it doesn't seem to cater to multiple columns as well as other suggestions on <a href="https://stackoverflow.com/questions/22491845/how-to-collapse-pandas-dataframe-columns-and-concatenate-strings">How to collapse Pandas Dataframe</a></p>
  <p>I'm not looking to concatenate strings, just shift everything over.</p>
  <p>I saw a method using &quot;R&quot; and melt, however I would like to stick with python/pandas if possible.</p>
  <p>Thanks.</p>