title: How to set the precision for the output of the pandas.DataFrame.loc in a Jupyter notebook?
body: <p>Can the precision of the tabular output of the pandas.DataFrame.loc function be increased inside a Jupyter notebook? </p>
  
  <p>I would like to see the output of the $f'_{cds}$ in the table below written with a 16 decimal digit precision: </p>
  
  <p><a href="https://i.stack.imgur.com/v4c3c.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/v4c3c.png" alt="Precision of the pandas.DataFrame.loc tabular output in a Jupyter notebookk"></a></p>
  
  <pre><code>pd.set_option('precision', 16)
  </code></pre>
  
  <p>Sets the output precison for pandas, but I would like to be able to set the precision just for the $f'_{cds}$ column. </p>
  
  <p>This is the example dataset I am using: </p>
  
  <blockquote>
    <p>h,$f'<em>{ex}$,$f'</em>{fwd}$,$E_{fwd}$,$E_{fwdn}$,$f'<em>{cds}$,$E</em>{cds}$,$E_{cdsn}$
    0.5,-0.2955202066613395,-0.5172595595568812,0.2217393528955416,0.750335672137813,-0.2833598684940762,0.01216033816726331,0.04114892279159381
    0.25,-0.2955202066613395,-0.4112478682644012,0.1157276616030616,0.3916065940481806,-0.2924514766709212,0.003068729990418351,0.01038416298190755
    0.125,-0.2955202066613395,-0.3543820493725782,0.05886184271123868,0.1991804329600149,-0.294751223803599,0.0007689828577405744,0.002602132918179141
    0.0625,-0.2955202066613395,-0.325172396632464,0.02965218997112445,0.1003389592411367,-0.2953278482673038,0.0001923583940356965,0.0006509145219167214
    0.03125,-0.2955202066613395,-0.3103980279268619,0.01487782126552234,0.05034451428416885,-0.2954721100178972,4.809664344235243e-05,0.0001627524695712948
    0.015625,-0.2955202066613395,-0.3029715965360111,0.007451389874671588,0.02521448519156843,-0.2955081820601322,1.202460120736104e-05,4.068960746613514e-05
    0.0078125,-0.2955202066613395,-0.2992489646633629,0.00372875800202338,0.01261760758815544,-0.2955172004835163,3.006177823283718e-06,1.017249499533797e-05
    0.00390625,-0.2955202066613395,-0.297385344322862,0.001865137661522465,0.00631137099758419,-0.295519455115155,7.515461845630789e-07,2.543129598661713e-06
    0.001953125,-0.2955202066613395,-0.2964529642682692,0.000932757606929624,0.003156324291551901,-0.2955200187747096,1.878866299764859e-07,6.357826833540365e-07
    0.0009765625,-0.2955202066613395,-0.2959866325476241,0.0004664258862845938,0.001578321467604782,-0.2955201596896586,4.697168093370507e-08,1.589457501548573e-07</p>
  </blockquote>
  
  <p>For the example dataset, the answer from Mohit works like this: </p>
  
  <pre><code>sqrerr.loc[:, ("h","$E_{cds}$","$f'_{ex}$", "$f'_{cds}$")].style.format({"$f'_{cds}$" : '{:.16f}'})
  </code></pre>