title: How to apply sas like formatting in python?
body: <p>I am trying to create the cross tabulation frequency table in python as in 2 way frequency in SAS.</p>
  
  <p>In SAS,they have used PROC FORMAT to display few contents in the output as per requirement.</p>
  
  <p>How do I achieve this in python?For example,one of the datasets has got a column as age_group with categories 1,2,3,4,5,6,7 and 8.</p>
  
  <p>But in print output,I want to display them as '0-23','24-27','48-59','60-71','72-79','80-87','88-99' and '100+' respectively with their frequencies.
  (Note: I do not want to change the original data).</p>
  
  <p>I have checked few formatting options,but most of them seem to be for floating points etc.How should I do this customized formatting for print?</p>
  
  <p>Thanks</p>