def to_latex(self, column_format=None, longtable=False, encoding=None,<EOL>multicolumn=False, multicolumn_format=None, multirow=False):
from pandas.io.formats.latex import LatexFormatter<EOL>latex_renderer = LatexFormatter(self, column_format=column_format,<EOL>longtable=longtable,<EOL>multicolumn=multicolumn,<EOL>multicolumn_format=multicolumn_format,<EOL>multirow=multirow)<EOL>if encoding is None:<EOL><INDENT>encoding = '<STR_LIT:utf-8>'<EOL><DEDENT>if hasattr(self.buf, '<STR_LIT>'):<EOL><INDENT>latex_renderer.write_result(self.buf)<EOL><DEDENT>elif isinstance(self.buf, str):<EOL><INDENT>import codecs<EOL>with codecs.open(self.buf, '<STR_LIT:w>', encoding=encoding) as f:<EOL><INDENT>latex_renderer.write_result(f)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>raise TypeError('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>
Render a DataFrame to a LaTeX tabular/longtable environment output.