title: How do I write to excel using pandas?
body: <p>I have tried two methods and I keep getting an error.</p>
  
  <p>My Current Code: </p>
  
  <pre><code>import pandas as pd
  from pandas import ExcelWriter
  from pandas import ExcelFile
  df = pd.DataFrame({'Data': [10, 20, 30, 20, 15, 30, 45]})
  writer = pd.ExcelWriter('/Users/anonymous/Desktop/Version4.xlsx', engine='xlsxwriter').
  df.to_excel(writer, sheet_name='Ex1')
  writer.save()
  
  I have the following error:
  ....   import xlsxwriter ModuleNotFoundError: No module named 'xlsxwriter'
  </code></pre>
  
  <p>I also tried not having an engine and then it had the same error except the module was openpyxl. I checked to make sure in my terminal and both of them are installed. </p>