@Substitution(header='<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>',<EOL>col_space_type='<STR_LIT:int>',<EOL>col_space='<STR_LIT>')<EOL><INDENT>@Substitution(shared_params=fmt.common_docstring,<EOL>returns=fmt.return_docstring)<EOL>def to_string(self, buf=None, columns=None, col_space=None, header=True,<EOL>index=True, na_rep='<STR_LIT>', formatters=None, float_format=None,<EOL>sparsify=None, index_names=True, justify=None,<EOL>max_rows=None, max_cols=None, show_dimensions=False,<EOL>decimal='<STR_LIT:.>', line_width=None):<DEDENT>
formatter = fmt.DataFrameFormatter(self, buf=buf, columns=columns,<EOL>col_space=col_space, na_rep=na_rep,<EOL>formatters=formatters,<EOL>float_format=float_format,<EOL>sparsify=sparsify, justify=justify,<EOL>index_names=index_names,<EOL>header=header, index=index,<EOL>max_rows=max_rows,<EOL>max_cols=max_cols,<EOL>show_dimensions=show_dimensions,<EOL>decimal=decimal,<EOL>line_width=line_width)<EOL>formatter.to_string()<EOL>if buf is None:<EOL><INDENT>result = formatter.buf.getvalue()<EOL>return result<EOL><DEDENT>
Render a DataFrame to a console-friendly tabular output.
%(shared_params)s
line_width : int, optional
    Width to wrap a line in characters.
%(returns)s
See Also
--------
to_html : Convert DataFrame to HTML.

Examples
--------
>>> d = {'col1': [1, 2, 3], 'col2': [4, 5, 6]}
>>> df = pd.DataFrame(d)
>>> print(df.to_string())
   col1  col2
0     1     4
1     2     5
2     3     6