title: pandas: Merge two columns with different names?
body: <p>I am trying to concatenate two dataframes, above and below. Not concatenate side-by-side.</p>
  
  <p>The dataframes contain the same data, however, in the first dataframe one column might have name "ObjectType" and in the second dataframe the column might have name "ObjectClass". When I do </p>
  
  <pre><code>df_total = pandas.concat ([df0, df1])
  </code></pre>
  
  <p>the df_total will have two column names, one with "ObjectType" and another with "ObjectClass". In each of these two columns, half of the values will be "NaN". So I have to manually merge these two columns into one which is a pain.</p>
  
  <p>Can I somehow merge the two columns into one? I would like to have a function that does something like:</p>
  
  <pre><code>df_total = pandas.merge_many_columns(input=["ObjectType,"ObjectClass"], output=["MyObjectClasses"]
  </code></pre>
  
  <p>which merges the two columns and creates a new column. I have looked into melt() but it does not really do this?</p>
  
  <p>(Maybe it would be nice if I could specify what will happen if there is a collision, say that two columns contain values, in that case I supply a lambda function that says "keep the largest value", "use an average", etc)</p>