title: Writing Percentages in Excel Using Pandas
body: <p>When writing to csv's before using Pandas, I would often use the following format for percentages: </p>
  
  <pre><code>'%0.2f%%' % (x * 100)
  </code></pre>
  
  <p>This would be processed by Excel correctly when loading the csv.</p>
  
  <p>Now, I'm trying to use Pandas' to_excel function and using</p>
  
  <pre><code>(simulated * 100.).to_excel(writer, 'Simulated', float_format='%0.2f%%')
  </code></pre>
  
  <p>and getting a "ValueError: invalid literal for float(): 0.0126%".  Without the '%%' it writes fine but is not formatted as percent.</p>
  
  <p>Is there a way to write percentages in Pandas' to_excel?</p>
  
  <p><strong>This question is all pretty old at this point</strong>.  For better solutions check out <a href="http://xlsxwriter.readthedocs.io/working_with_pandas.html" rel="nofollow noreferrer">xlsxwriter working with pandas</a>.</p>