title: Export pandas dataframe to Excel and setting columns width and text wrapping
body: <p>I have to export this dataframe to Excel </p>
  
  <pre class="lang-py prettyprint-override"><code>    import pandas as pd
      import xlsxwriter
      df1 = pd.DataFrame([['a', 'b'], ['c', 'd']],
                      index=['row 1', 'row 2'],
                      columns=['col 1', 'col 2'])
  
      df1.to_excel(os.path.join('tmp', "output1.xlsx"))  # doctest: +SKIP
      df2 = df1.copy()
      with pd.ExcelWriter(os.path.join('tmp', "output2.xlsx"), engine='xlsxwriter') as writer:  # doctest: +SKIP
          df1.to_excel(writer, sheet_name='Sheet_name_1')
          df2.to_excel(writer, sheet_name='Sheet_name_2')
  </code></pre>
  
  <p>I know that 'xlsxwriter' allows multiple customizations. How to set column width and text wrapping, taking the above code as the draft?</p>