code: def to_ascii(self):
      df = self.model.summary
      justify = self.justify
      ci = 100 * (1 - self.model.alpha)
      decimals = self.decimals
  
      repr_string = ""
  
      repr_string += repr(self.model) + "\n"
      for string, value in self.headers:
          repr_string += "{} = {}".format(justify(string), value) + "\n"
  
      repr_string += "\n" + "---" + "\n"
  
      df.columns = utils.map_leading_space(df.columns)
  
      if self.columns is not None:
          columns = df.columns.intersection(
              utils.map_leading_space(self.columns)
          )
      else:
          columns = df.columns
  
      if len(columns) <= 7:
          # only need one row of display
          first_row_set = [
              "coef",
              "exp(coef)",
              "se(coef)",
              "coef lower %d%%" % ci,
              "coef upper %d%%" % ci,
              "exp(coef) lower %d%%" % ci,
              "exp(coef) upper %d%%" % ci,
              "cmp to",
              "z",
              "p",
              "-log2(p)",
          ]
          second_row_set = []
  
      else:
          first_row_set = [
              "coef",
              "exp(coef)",
              "se(coef)",
              "coef lower %d%%" % ci,
              "coef upper %d%%" % ci,
              "exp(coef) lower %d%%" % ci,
              "exp(coef) upper %d%%" % ci,
          ]
          second_row_set = ["cmp to", "z", "p", "-log2(p)"]
  
      repr_string += df[columns].to_string(
          float_format=utils.format_floats(decimals),
          formatters={
              **{
                  c: utils.format_exp_floats(decimals)
                  for c in columns
                  if "exp(coef)" in c
              },
              **{
                  utils.leading_space("p"): utils.format_p_value(
                      decimals
                  )
              },
          },
          columns=[
              c
              for c in utils.map_leading_space(first_row_set)
              if c in columns
          ],
      )
  
      if second_row_set:
          repr_string += "\n\n"
          repr_string += df[columns].to_string(
              float_format=utils.format_floats(decimals),
              formatters={
                  **{
                      c: utils.format_exp_floats(decimals)
                      for c in columns
                      if "exp(" in c
                  },
                  **{
                      utils.leading_space("p"): utils.format_p_value(
                          decimals
                      )
                  },
              },
              columns=utils.map_leading_space(second_row_set),
          )
  
      with np.errstate(invalid="ignore", divide="ignore"):
          repr_string += "\n" + "---" + "\n"
          for string, value in self.footers:
              repr_string += "{} = {}".format(string, value) + "\n"
      return repr_string
  
file_path: lifelines/lifelines/utils/printer.py
imports: from typing import *
  import numpy
  from lifelines import utils
  import pandas
label_desc: Use image node_id 9 for calling the Printer obj's underlying member method code with example usage: obj.to_ascii() and returns: repr_string