Skip to content

Commit 954d90c

Browse files
committed
drop to_html and to_string
1 parent c0e5c7f commit 954d90c

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

pandas/core/frame.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2032,8 +2032,7 @@ def to_parquet(self, fname, engine='auto', compression='snappy',
20322032
@Substitution(header='Write out the column names. If a list of strings '
20332033
'is given, it is assumed to be aliases for the '
20342034
'column names')
2035-
@Substitution(shared_params1=fmt.common_docstring[:-320],
2036-
shared_params2=fmt.common_docstring[-315:-5],
2035+
@Substitution(shared_params=fmt.common_docstring,
20372036
returns=fmt.return_docstring)
20382037
def to_string(self, buf=None, columns=None, col_space=None, header=True,
20392038
index=True, na_rep='NaN', formatters=None, float_format=None,
@@ -2042,11 +2041,13 @@ def to_string(self, buf=None, columns=None, col_space=None, header=True,
20422041
show_dimensions=False):
20432042
"""
20442043
Render a DataFrame to a console-friendly tabular output.
2045-
%(shared_params1)s
2044+
2045+
%(shared_params)s
20462046
line_width : int, optional
20472047
Width to wrap a line in characters.
2048-
%(shared_params2)s
2048+
20492049
%(returns)s
2050+
20502051
See Also
20512052
--------
20522053
to_html : Convert DataFrame to HTML.
@@ -2080,8 +2081,7 @@ def to_string(self, buf=None, columns=None, col_space=None, header=True,
20802081
return result
20812082

20822083
@Substitution(header='whether to print column labels, default True')
2083-
@Substitution(shared_params1=fmt.common_docstring[:-320],
2084-
shared_params2=fmt.common_docstring[-315:-5],
2084+
@Substitution(shared_params=fmt.common_docstring,
20852085
returns=fmt.return_docstring)
20862086
def to_html(self, buf=None, columns=None, col_space=None, header=True,
20872087
index=True, na_rep='NaN', formatters=None, float_format=None,
@@ -2091,14 +2091,14 @@ def to_html(self, buf=None, columns=None, col_space=None, header=True,
20912091
border=None, table_id=None):
20922092
"""
20932093
Render a DataFrame as an HTML table.
2094-
%(shared_params1)s
2094+
2095+
%(shared_params)s
20952096
bold_rows : boolean, default True
20962097
Make the row labels bold in the output
20972098
classes : str or list or tuple, default None
20982099
CSS class(es) to apply to the resulting html table
20992100
escape : boolean, default True
21002101
Convert the characters <, >, and & to HTML-safe sequences.
2101-
%(shared_params2)s
21022102
notebook : {True, False}, default False
21032103
Whether the generated HTML is for IPython Notebook.
21042104
decimal : string, default '.'
@@ -2116,7 +2116,9 @@ def to_html(self, buf=None, columns=None, col_space=None, header=True,
21162116
A css id is included in the opening `<table>` tag if specified.
21172117
21182118
.. versionadded:: 0.23.0
2119+
21192120
%(returns)s
2121+
21202122
See Also
21212123
--------
21222124
to_string : Convert DataFrame to a string.

0 commit comments

Comments
 (0)