bigframes.pandas.DataFrame.to_latex#
- DataFrame.to_latex(buf=None,columns:Sequence|None=None,header:bool|Sequence[str]=True,index:bool=True,*,allow_large_results:bool|None=None,**kwargs)→str|None[source]#
Render object to a LaTeX tabular, longtable, or nested table.
Requires
\usepackage{{booktabs}}. The output can be copy/pastedinto a main LaTeX document or read from an external filewith\input{{table.tex}}.Examples:
>>>df=bpd.DataFrame({'col1':[1,2],'col2':[3,4]})>>>print(df.to_latex())\begin{tabular}{lrr}\toprule& col1 & col2 \\\midrule0 & 1 & 3 \\1 & 2 & 4 \\\bottomrule\end{tabular}
- Parameters:
buf (str,Path orStringIO-like,optional,default None) – Buffer to write to. If None, the output is returned as a string.
columns (list oflabel,optional) – The subset of columns to write. Writes all columns by default.
header (bool orlist ofstr,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).
allow_large_results (bool,default None) – If not None, overrides the global setting to allow or disallow largequery results over the default size limit of 10 GB.
- Returns:
If buf is None, returns the result as a string. Otherwise returnsNone.
- Return type:
str or None