title: Py Pandas .format(dataframe)
body: <p>As Python newbie I recently discovered that with Py 2.7 I can do something like:</p>
  
  <pre><code>print '{:20,.2f}'.format(123456789)
  </code></pre>
  
  <p>which will give the resulting output:</p>
  
  <pre><code>123,456,789.00
  </code></pre>
  
  <p>I'm now looking to have a similar outcome for a pandas df so my code was like:</p>
  
  <pre><code>import pandas as pd
  import random
  data = [[random.random()*10000 for i in range(1,4)] for j in range (1,8)]
  df = pd.DataFrame (data)
  print '{:20,.2f}'.format(df)
  </code></pre>
  
  <p>In this case I have the error:</p>
  
  <pre><code> Unknown format code 'f' for object of type 'str'
  </code></pre>
  
  <p>Any suggestions to perform something like <code>'{:20,.2f}'.format(df)</code> ?</p>
  
  <p>As now my idea is to index the dataframe (it's a small one), then format each individual float within it, might be assign astype(str), and rebuild the DF ... but looks so looks ugly :-( and I'm not even sure it'll work ..</p>
  
  <p>What do you think ? I'm stuck ... and would like to have a better format for my dataframes when these are converted to reportlabs grids.</p>