diff --git a/pandas/core/format.py b/pandas/core/format.py index 985b349273130..0c1a3dbadbd86 100644 --- a/pandas/core/format.py +++ b/pandas/core/format.py @@ -58,18 +58,13 @@ the print configuration (controlled by set_option), 'right' out of the box.""" -force_unicode_docstring = """ - force_unicode : bool, default False - Always return a unicode result. Deprecated in v0.10.0 as string - formatting is now rendered to unicode by default.""" - return_docstring = """ Returns ------- formatted : string (or unicode, depending on data and options)""" -docstring_to_string = common_docstring + justify_docstring + force_unicode_docstring + return_docstring +docstring_to_string = common_docstring + justify_docstring + return_docstring class CategoricalFormatter(object): @@ -300,7 +295,7 @@ class DataFrameFormatter(TableFormatter): """ __doc__ = __doc__ if __doc__ else '' - __doc__ += docstring_to_string + __doc__ += common_docstring + justify_docstring + return_docstring def __init__(self, frame, buf=None, columns=None, col_space=None, header=True, index=True, na_rep='NaN', formatters=None, diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 77b8c4cf35aad..0eeface27238f 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -1414,7 +1414,7 @@ def to_stata( write_index=write_index) writer.write_file() - @Appender(fmt.common_docstring + fmt.justify_docstring + fmt.return_docstring, indents=1) + @Appender(fmt.docstring_to_string, indents=1) def to_string(self, buf=None, columns=None, col_space=None, header=True, index=True, na_rep='NaN', formatters=None, float_format=None, sparsify=None, index_names=True, @@ -1442,7 +1442,7 @@ def to_string(self, buf=None, columns=None, col_space=None, result = formatter.buf.getvalue() return result - @Appender(fmt.common_docstring + fmt.justify_docstring + fmt.return_docstring, indents=1) + @Appender(fmt.docstring_to_string, indents=1) def to_html(self, buf=None, columns=None, col_space=None, colSpace=None, header=True, index=True, na_rep='NaN', formatters=None, float_format=None, sparsify=None, index_names=True,