title: Concatenate pandas dataframes via a column and filling in blanks with 'NaN'
body: <p>I have four pandas dataframes that can be generated with the below code:</p>
  
  <pre><code>#df 1
  time1=pandas.Series([0,20,40,60,120])
  pPAK2=pandas.Series([0,3,15,21,23])
  cols=['time','pPAK2']
  
  df=pandas.DataFrame([time1,pPAK2])
  df=df.transpose()
  df.columns=cols
  df.to_csv('pPAK2.csv',sep='\t')
  pak2_df=df
  
  #df2
  time2=pandas.Series([0,15,30,60,120])
  cAbl=pandas.Series([0,15,34,10,0])
  df=pandas.DataFrame([time2,cAbl])
  df=df.transpose()
  cols=['time','pcAbl']
  df.columns=cols
  df.to_csv('pcAbl.csv',sep='\t')
  pcAbl_df=df
  
  #df 3
  time7=pandas.Series([0,60,120,240,480,960,1440])
  pSmad3_n=pandas.Series([0,16,14,12,8,7.5,6])
  scale_factor=40
  pSmad3_n=pSmad3_n*scale_factor
  
  #plt.plot(time7,pSmad3)
  df=pandas.DataFrame([time7,pSmad3_n])
  df=df.transpose()
  cols=['time','pSmad3_n']
  df.columns=cols
  df.to_csv('pSmad3_n.csv',sep='\t')
  
  smad3_df=df
  
  #df4
  time8=pandas.Series([0,240,480,1440])
  PAI1_mRNA=pandas.Series([0,23,25,5])
  scale_factor=5
  PAI1_mRNA=PAI1_mRNA*scale_factor
  df=pandas.DataFrame([time8,PAI1_mRNA])
  df=df.transpose()
  cols=['time','PAI1_mRNA']
  df.columns=cols
  df.to_csv('PAI1_mRNA.csv',sep='\t')
  PAI1_df=df
  
  
  #print dataframes
  print PAI1_df
  print pak2_df
  print pcAbl_df
  print smad3_df
  </code></pre>
  
  <p>I want to concatenate these dataframes by the time column with the pandas concat function but I can't get the output right. The output should look something like this, if were to just concatenate <code>PAI1_df</code> and <code>pak2_df</code> </p>
  
  <pre><code>   time  PAI1_mRNA    pPAK2
  0     0          0    0
  1    20    'NaN'      3
  2    40    'NaN'      15
  3    60     'NaN'     21
  4    120    'NaN'     23
  5   240        115    'NaN'
  6   480        125    'NaN'
  7  1440         25    'NaN
  </code></pre>
  
  <p>I think it should be easy but there are a lot of features in the doc, does anybody know how to do this? </p>