def to_latex(self, buf: Optional[IO[str]]=None, columns: Optional[List[Name]]=None, col_space: Optional[int]=None, header: bool=True, index: bool=True, na_rep: str='NaN', formatters: Optional[Union[(List[Callable[([Any], str)]], Dict[(Name, Callable[([Any], str)])])]]=None, float_format: Optional[Callable[([float], str)]]=None, sparsify: Optional[bool]=None, index_names: bool=True, bold_rows: bool=False, column_format: Optional[str]=None, longtable: Optional[bool]=None, escape: Optional[bool]=None, encoding: Optional[str]=None, decimal: str='.', multicolumn: Optional[bool]=None, multicolumn_format: Optional[str]=None, multirow: Optional[bool]=None) -> Optional[str]:
    "\n        Render an object to a LaTeX tabular environment table.\n\n        Render an object to a tabular environment table. You can splice this into a LaTeX\n        document. Requires usepackage{booktabs}.\n\n        .. note:: This method should only be used if the resulting pandas object is expected\n                  to be small, as all the data is loaded into the driver's memory. If the input\n                  is large, consider alternative formats.\n\n        Parameters\n        ----------\n        buf : file descriptor or None\n            Buffer to write to. If None, the output is returned as a string.\n        columns : list of label, optional\n            The subset of columns to write. Writes all columns by default.\n        col_space : int, optional\n            The minimum width of each column.\n        header : bool or list of str, default True\n            Write out the column names. If a list of strings is given, it is assumed to be aliases\n            for the column names.\n        index : bool, default True\n            Write row names (index).\n        na_rep : str, default ‘NaN’\n            Missing data representation.\n        formatters : list of functions or dict of {str: function}, optional\n            Formatter functions to apply to columns’ elements by position or name. The result of\n            each function must be a unicode string. List must be of length equal to the number of\n            columns.\n        float_format : str, optional\n            Format string for floating point numbers.\n        sparsify : bool, optional\n            Set to False for a DataFrame with a hierarchical index to print every multiindex key at\n            each row. By default, the value will be read from the config module.\n        index_names : bool, default True\n            Prints the names of the indexes.\n        bold_rows : bool, default False\n            Make the row labels bold in the output.\n        column_format : str, optional\n            The columns format as specified in LaTeX table format e.g. ‘rcl’ for 3 columns. By\n            default, ‘l’ will be used for all columns except columns of numbers, which default\n            to ‘r’.\n        longtable : bool, optional\n            By default, the value will be read from the pandas config module. Use a longtable\n            environment instead of tabular. Requires adding a usepackage{longtable} to your LaTeX\n            preamble.\n        escape : bool, optional\n            By default, the value will be read from the pandas config module. When set to False\n            prevents from escaping latex special characters in column names.\n        encoding : str, optional\n            A string representing the encoding to use in the output file, defaults to ‘ascii’ on\n            Python 2 and ‘utf-8’ on Python 3.\n        decimal : str, default ‘.’\n            Character recognized as decimal separator, e.g. ‘,’ in Europe.\n        multicolumn : bool, default True\n            Use multicolumn to enhance MultiIndex columns. The default will be read from the config\n            module.\n        multicolumn_format : str, default ‘l’\n            The alignment for multicolumns, similar to column_format The default will be read from\n            the config module.\n        multirow : bool, default False\n            Use multirow to enhance MultiIndex rows. Requires adding a usepackage{multirow} to your\n            LaTeX preamble. Will print centered labels (instead of top-aligned) across the contained\n            rows, separating groups via clines. The default will be read from the pandas config\n            module.\n\n        Returns\n        -------\n        str or None\n            If buf is None, returns the resulting LateX format as a string. Otherwise returns None.\n\n        See Also\n        --------\n        DataFrame.to_string : Render a DataFrame to a console-friendly\n            tabular output.\n        DataFrame.to_html : Render a DataFrame as an HTML table.\n\n\n        Examples\n        --------\n        >>> df = ps.DataFrame({'name': ['Raphael', 'Donatello'],\n        ...                    'mask': ['red', 'purple'],\n        ...                    'weapon': ['sai', 'bo staff']},\n        ...                   columns=['name', 'mask', 'weapon'])\n        >>> print(df.to_latex(index=False)) # doctest: +NORMALIZE_WHITESPACE\n        \\begin{tabular}{lll}\n        \\toprule\n              name &    mask &    weapon \\\\\n        \\midrule\n           Raphael &     red &       sai \\\\\n         Donatello &  purple &  bo staff \\\\\n        \\bottomrule\n        \\end{tabular}\n        <BLANKLINE>\n        "
    args = locals()
    psdf = self
    return validate_arguments_and_invoke_function(psdf._to_internal_pandas(), self.to_latex, pd.DataFrame.to_latex, args)
Render an object to a LaTeX tabular environment table.

Render an object to a tabular environment table. You can splice this into a LaTeX
document. Requires usepackage{booktabs}.

.. note:: This method should only be used if the resulting pandas object is expected
          to be small, as all the data is loaded into the driver's memory. If the input
          is large, consider alternative formats.

Parameters
----------
buf : file descriptor or None
    Buffer to write to. If None, the output is returned as a string.
columns : list of label, optional
    The subset of columns to write. Writes all columns by default.
col_space : int, optional
    The minimum width of each column.
header : bool or list of str, default True
    Write out the column names. If a list of strings is given, it is assumed to be aliases
    for the column names.
index : bool, default True
    Write row names (index).
na_rep : str, default ‘NaN’
    Missing data representation.
formatters : list of functions or dict of {str: function}, optional
    Formatter functions to apply to columns’ elements by position or name. The result of
    each function must be a unicode string. List must be of length equal to the number of
    columns.
float_format : str, optional
    Format string for floating point numbers.
sparsify : bool, optional
    Set to False for a DataFrame with a hierarchical index to print every multiindex key at
    each row. By default, the value will be read from the config module.
index_names : bool, default True
    Prints the names of the indexes.
bold_rows : bool, default False
    Make the row labels bold in the output.
column_format : str, optional
    The columns format as specified in LaTeX table format e.g. ‘rcl’ for 3 columns. By
    default, ‘l’ will be used for all columns except columns of numbers, which default
    to ‘r’.
longtable : bool, optional
    By default, the value will be read from the pandas config module. Use a longtable
    environment instead of tabular. Requires adding a usepackage{longtable} to your LaTeX
    preamble.
escape : bool, optional
    By default, the value will be read from the pandas config module. When set to False
    prevents from escaping latex special characters in column names.
encoding : str, optional
    A string representing the encoding to use in the output file, defaults to ‘ascii’ on
    Python 2 and ‘utf-8’ on Python 3.
decimal : str, default ‘.’
    Character recognized as decimal separator, e.g. ‘,’ in Europe.
multicolumn : bool, default True
    Use multicolumn to enhance MultiIndex columns. The default will be read from the config
    module.
multicolumn_format : str, default ‘l’
    The alignment for multicolumns, similar to column_format The default will be read from
    the config module.
multirow : bool, default False
    Use multirow to enhance MultiIndex rows. Requires adding a usepackage{multirow} to your
    LaTeX preamble. Will print centered labels (instead of top-aligned) across the contained
    rows, separating groups via clines. The default will be read from the pandas config
    module.

Returns
-------
str or None
    If buf is None, returns the resulting LateX format as a string. Otherwise returns None.

See Also
--------
DataFrame.to_string : Render a DataFrame to a console-friendly
    tabular output.
DataFrame.to_html : Render a DataFrame as an HTML table.


Examples
--------
>>> df = ps.DataFrame({'name': ['Raphael', 'Donatello'],
...                    'mask': ['red', 'purple'],
...                    'weapon': ['sai', 'bo staff']},
...                   columns=['name', 'mask', 'weapon'])
>>> print(df.to_latex(index=False)) # doctest: +NORMALIZE_WHITESPACE
\begin{tabular}{lll}
\toprule
      name &    mask &    weapon \\
\midrule
   Raphael &     red &       sai \\
 Donatello &  purple &  bo staff \\
\bottomrule
\end{tabular}
<BLANKLINE>
def to_latex(self, buf: Optional[IO[str]]=None, columns: Optional[List[Name]]=None, col_space: Optional[int]=None, header: bool=True, index: bool=True, na_rep: str='NaN', formatters: Optional[Union[(List[Callable[([Any], str)]], Dict[(Name, Callable[([Any], str)])])]]=None, float_format: Optional[Callable[([float], str)]]=None, sparsify: Optional[bool]=None, index_names: bool=True, bold_rows: bool=False, column_format: Optional[str]=None, longtable: Optional[bool]=None, escape: Optional[bool]=None, encoding: Optional[str]=None, decimal: str='.', multicolumn: Optional[bool]=None, multicolumn_format: Optional[str]=None, multirow: Optional[bool]=None) -> Optional[str]:
    "\n        Render an object to a LaTeX tabular environment table.\n\n        Render an object to a tabular environment table. You can splice this into a LaTeX\n        document. Requires usepackage{booktabs}.\n\n        .. note:: This method should only be used if the resulting pandas object is expected\n                  to be small, as all the data is loaded into the driver's memory. If the input\n                  is large, consider alternative formats.\n\n        Parameters\n        ----------\n        buf : file descriptor or None\n            Buffer to write to. If None, the output is returned as a string.\n        columns : list of label, optional\n            The subset of columns to write. Writes all columns by default.\n        col_space : int, optional\n            The minimum width of each column.\n        header : bool or list of str, default True\n            Write out the column names. If a list of strings is given, it is assumed to be aliases\n            for the column names.\n        index : bool, default True\n            Write row names (index).\n        na_rep : str, default ‘NaN’\n            Missing data representation.\n        formatters : list of functions or dict of {str: function}, optional\n            Formatter functions to apply to columns’ elements by position or name. The result of\n            each function must be a unicode string. List must be of length equal to the number of\n            columns.\n        float_format : str, optional\n            Format string for floating point numbers.\n        sparsify : bool, optional\n            Set to False for a DataFrame with a hierarchical index to print every multiindex key at\n            each row. By default, the value will be read from the config module.\n        index_names : bool, default True\n            Prints the names of the indexes.\n        bold_rows : bool, default False\n            Make the row labels bold in the output.\n        column_format : str, optional\n            The columns format as specified in LaTeX table format e.g. ‘rcl’ for 3 columns. By\n            default, ‘l’ will be used for all columns except columns of numbers, which default\n            to ‘r’.\n        longtable : bool, optional\n            By default, the value will be read from the pandas config module. Use a longtable\n            environment instead of tabular. Requires adding a usepackage{longtable} to your LaTeX\n            preamble.\n        escape : bool, optional\n            By default, the value will be read from the pandas config module. When set to False\n            prevents from escaping latex special characters in column names.\n        encoding : str, optional\n            A string representing the encoding to use in the output file, defaults to ‘ascii’ on\n            Python 2 and ‘utf-8’ on Python 3.\n        decimal : str, default ‘.’\n            Character recognized as decimal separator, e.g. ‘,’ in Europe.\n        multicolumn : bool, default True\n            Use multicolumn to enhance MultiIndex columns. The default will be read from the config\n            module.\n        multicolumn_format : str, default ‘l’\n            The alignment for multicolumns, similar to column_format The default will be read from\n            the config module.\n        multirow : bool, default False\n            Use multirow to enhance MultiIndex rows. Requires adding a usepackage{multirow} to your\n            LaTeX preamble. Will print centered labels (instead of top-aligned) across the contained\n            rows, separating groups via clines. The default will be read from the pandas config\n            module.\n\n        Returns\n        -------\n        str or None\n            If buf is None, returns the resulting LateX format as a string. Otherwise returns None.\n\n        See Also\n        --------\n        DataFrame.to_string : Render a DataFrame to a console-friendly\n            tabular output.\n        DataFrame.to_html : Render a DataFrame as an HTML table.\n\n\n        Examples\n        --------\n        >>> df = ps.DataFrame({'name': ['Raphael', 'Donatello'],\n        ...                    'mask': ['red', 'purple'],\n        ...                    'weapon': ['sai', 'bo staff']},\n        ...                   columns=['name', 'mask', 'weapon'])\n        >>> print(df.to_latex(index=False)) # doctest: +NORMALIZE_WHITESPACE\n        \\begin{tabular}{lll}\n        \\toprule\n              name &    mask &    weapon \\\\\n        \\midrule\n           Raphael &     red &       sai \\\\\n         Donatello &  purple &  bo staff \\\\\n        \\bottomrule\n        \\end{tabular}\n        <BLANKLINE>\n        "
    args = locals()
    psdf = self
    return validate_arguments_and_invoke_function(psdf._to_internal_pandas(), self.to_latex, pd.DataFrame.to_latex, args)