title: Specific Number format Python to Excel
body: <p>I am using a custom function and I am trying to apply a specific formatting to the output file that is sent to Excel.  I want positive/negative integers = 1234.34 to look like 1,234/(1,234).  The function I have works, but the output is a string and i would like it to show up as an integer/float/number in excel:</p>
  
  <pre><code>def formatter(x):
      if x &gt; 0:
          return '{0:,.0f}'.format(x)
      else:
          return '({0:,.0f})'.format(abs(x))
  
  for col in DFstats2.columns[1:]:
      DFstats2[col] = DFstats2[col].apply(formatter)
  </code></pre>
  
  <p>Currently for Excel to treat these as numbers, I have to right select 'convert to number' in order to do any kind of operations on them.</p>
  
  <p>Any guidance would be appreciated, thank you!</p>