title: Is there a way to auto-adjust Excel column widths with pandas.ExcelWriter?
body: <p>I am being asked to generate some Excel reports. I am currently using pandas quite heavily for my data, so naturally I would like to use the <code>pandas.ExcelWriter</code> method to generate these reports.  However the fixed column widths are a problem.</p>
  <p>The code I have so far is simple enough.  Say I have a dataframe called <code>df</code>:</p>
  <pre><code>writer = pd.ExcelWriter(excel_file_path, engine='openpyxl')
  df.to_excel(writer, sheet_name=&quot;Summary&quot;)
  </code></pre>
  <p>I was looking over the pandas docs, and I don't really see any options to set column widths.  Is there a trick to make it such that the columns auto-adjust to the data? Or is there something I can do after the fact to the xlsx file to adjust the column widths?</p>
  <p>(I am using the OpenPyXL library, and generating .xlsx files - if that makes any difference.)</p>