title: Pandas - Write multiple dataframes to single excel sheet
body: <p>I have a dataframe with 45 columns and 1000 rows. My requirement is to create a single excel sheet with the top 2 values of each column and their percentages (suppose col 1 has the value 'python' present 500 times in it, the percentage should be 50)</p>
  
  <p>I used:</p>
  
  <pre><code>    writer = pd.ExcelWriter('abc.xlsx')
      df = pd.read_sql('select * from table limit 1000', &lt;db connection sring&gt;)
      column_list = df.columns.tolist()
      df.fillna("NULL", inplace = True)
      for obj in column_list:
          df1 = pd.DataFrame(df[obj].value_counts().nlargest(2)).to_excel(writer,sheet_name=obj
  writer.save()
  </code></pre>
  
  <p>This writes the output in separate excel tabs of the same document. I need them in a single sheet in the below format:</p>
  
  <pre><code>Column Name          Value         Percentage
  col1                 abc           50
  col1                 def           30
  col2                 123           40
  col2                 456           30
  </code></pre>
  
  <p>....</p>
  
  <p>Let me know any other functions as well to get to this output.</p>