class_docstr: Produce a simple ASCII, CSV, HTML, or LaTeX table from a
  *rectangular* (2d!) array of data, not necessarily numerical.
  Directly supports at most one header row,
  which should be the length of data[0].
  Directly supports at most one stubs column,
  which must be the length of data.
  (But see `insert_stubs` method.)
  See globals `default_txt_fmt`, `default_csv_fmt`, `default_html_fmt`,
  and `default_latex_fmt` for formatting options.
  
  Sample uses::
  
      mydata = [[11,12],[21,22]]  # data MUST be 2-dimensional
      myheaders = [ "Column 1", "Column 2" ]
      mystubs = [ "Row 1", "Row 2" ]
      tbl = text.SimpleTable(mydata, myheaders, mystubs, title="Title")
      print( tbl )
      print( tbl.as_html() )
      # set column specific data formatting
      tbl = text.SimpleTable(mydata, myheaders, mystubs,
          data_fmts=["%3.2f","%d"])
      print( tbl.as_csv() )
      with open('c:/temp/temp.tex','w') as fh:
          fh.write( tbl.as_latex_tabular() )
class_docstr_tok: ["Produce","a","simple","ASCII",",","CSV",",","HTML",",","or","LaTeX","table","from","a","*","rectangular","*","(","2d","!",")","array","of","data",",","not","necessarily","numerical",".","Directly","supports","at","most","one","header","row",",","which","should","be","the","length","of","data","[","0","]",".","Directly","supports","at","most","one","stubs","column",",","which","must","be","the","length","of","data",".","(","But","see","`","insert_stubs","`","method",".",")","See","globals","`","default_txt_fmt","`",",","`","default_csv_fmt","`",",","`","default_html_fmt","`",",","and","`","default_latex_fmt","`","for","formatting","options",".","Sample","uses",":",":","mydata","=","[","[","11,12","]",",","[","21,22","]","]","#","data","MUST","be","2-dimensional","myheaders","=","[","``","Column","1","''",",","``","Column","2","''","]","mystubs","=","[","``","Row","1","''",",","``","Row","2","''","]","tbl","=","text.SimpleTable","(","mydata",",","myheaders",",","mystubs",",","title=","''","Title","''",")","print","(","tbl",")","print","(","tbl.as_html","(",")",")","#","set","column","specific","data","formatting","tbl","=","text.SimpleTable","(","mydata",",","myheaders",",","mystubs",",","data_fmts=","[","``","%","3.2f","''",",","''","%","d","''","]",")","print","(","tbl.as_csv","(",")",")","with","open","(","'","c",":","\/temp\/temp.tex","'",",","'","w","'",")","as","fh",":","fh.write","(","tbl.as_latex_tabular","(",")",")"]
docstr: Return string, the table in CSV format.
  Currently only supports comma separator.
docstr_tok: ["Return","string",",","the","table","in","CSV","format",".","Currently","only","supports","comma","separator","."]
code: def as_csv(self, **fmt_dict):
      """Return string, the table in CSV format.
      Currently only supports comma separator."""
      # fetch the format, which may just be default_csv_format
      fmt = self._get_fmt("csv", **fmt_dict)
      return self.as_text(**fmt)
  
imports: from statsmodels.compat.python import lmap, lrange
  from itertools import cycle, zip_longest
  import csv
label_desc: Use image node_id 15 for calling the SimpleTable obj's underlying member method code with example usage: obj.as_csv() and returns: self