Display 2 decimal places, and use commas to separate thousands, in Jupyter/pandas?
<p>I'm working with pandas 0.18 in Jupyter. </p>

<p>I'd like to configure Jupyter/pandas to display 2 decimal places throughout, and to use comma separators in thousands. </p>

<p>How can I do this?</p>

<p>Configure the following <a href="http://pandas.pydata.org/pandas-docs/stable/options.html#available-options" rel="nofollow">option</a> in any cell:</p>

<pre><code>pandas.options.display.float_format = '{:,.2f}'.format
</code></pre>

<p>You can also format the output for any float throughout the notebook with this <a href="http://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-precision" rel="nofollow">magic command</a>:</p>

<pre><code>%precision %.2f
</code></pre>

python pandas jupyter