Python | Pandas DataFrame.to_latex() method Last Updated : 17 Sep, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report With the help of DataFrame.to_latex() method, We can get the dataframe in the form of latex document which we can open as a separate file by using DataFrame.to_latex() method. Syntax : DataFrame.to_latex() Return : Return the dataframe as a latex document. Example #1 : In this example we can say that by using DataFrame.to_latex() method, we are able to get the dataframe in the form latex document. Python3 1=1 # import DataFrame import pandas as pd # using DataFrame.to_latex() method gfg = pd.DataFrame({'Name': ['Marks'], 'Jitender': ['78'], 'Rahul': ['77.9']}) print(gfg.to_latex(index = True, multirow = True)) Output : \begin{tabular}{llll} \toprule {} & Name & Jitender & Rahul \\ \midrule 0 & Marks & 78 & 77.9 \\ \bottomrule \end{tabular} Example #2 : Python3 1=1 # import DataFrame import pandas as pd # using DataFrame.to_latex() method gfg = pd.DataFrame({'Name': ['Marks', 'Gender'], 'Jitender': ['78', 'Male'], 'Purnima': ['78.9', 'Female']}) print(gfg.to_latex(index = False, multirow = True)) Output : \begin{tabular}{lll} \toprule Name & Jitender & Purnima \\ \midrule Marks & 78 & 78.9 \\ Gender & Male & Female \\ \bottomrule \end{tabular} Comment More infoAdvertise with us Next Article Python | Pandas DataFrame.to_latex() method J jitender_1998 Follow Improve Article Tags : Python Python-pandas Python pandas-dataFrame Pandas-DataFrame-Methods Practice Tags : python Similar Reads Python | Pandas DataFrame.to_html() method With help of DataFrame.to_html() method, we can get the html format of a dataframe by using DataFrame.to_html() method. Syntax : DataFrame.to_html() Return : Return the html format of a dataframe. Example #1 : In this example we can say that by using DataFrame.to_html() method, we are able to get th 1 min read DataFrame.to_excel() method in Pandas The to_excel() method is used to export the DataFrame to the excel file. Â To write a single object to the excel file, we have to specify the target file name. If we want to write to multiple sheets, we need to create an ExcelWriter object with target filename and also need to specify the sheet in th 3 min read Pandas DataFrame.to_sparse() Method Pandas DataFrame is a two-dimensional size-mutable, potentially heterogeneous tabular data structure with labeled axes (rows and columns). Arithmetic operations align on both row and column labels. It can be thought of as a dict-like container for Series objects. This is the primary data structure o 2 min read Python | Pandas Index.to_frame() Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas Index.to_frame() function create a dataFrame from the given index with a column 2 min read Python | Pandas MultiIndex.to_frame() Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas MultiIndex.to_frame() function create a DataFrame with the levels of the MultiI 2 min read Like