Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pandas/core/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@
index_names : bool, optional
Prints the names of the indexes, default True
force_unicode : bool, default False
Always return a unicode result
Always return a unicode result. Deprecated in v0.10.0 as string
formatting is now rendered to unicode by default.

Returns
-------
Expand Down
21 changes: 18 additions & 3 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -1517,7 +1517,7 @@ def to_string(self, buf=None, columns=None, col_space=None, colSpace=None,
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,
justify=None, force_unicode=False, bold_rows=True,
justify=None, force_unicode=None, bold_rows=True,
classes=None):
"""
to_html-specific options
Expand All @@ -1527,8 +1527,12 @@ def to_html(self, buf=None, columns=None, col_space=None, colSpace=None,
Render a DataFrame to an html table.
"""

import warnings
if force_unicode is not None: # pragma: no cover
warnings.warn("force_unicode is deprecated, it will have no "
"effect", FutureWarning)

if colSpace is not None: # pragma: no cover
import warnings
warnings.warn("colSpace is deprecated, use col_space",
FutureWarning)
col_space = colSpace
Expand All @@ -1551,7 +1555,7 @@ def to_html(self, buf=None, columns=None, col_space=None, colSpace=None,
def to_latex(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,
bold_rows=True):
bold_rows=True, force_unicode=None):
"""
to_latex-specific options
bold_rows : boolean, default True
Expand All @@ -1560,6 +1564,17 @@ def to_latex(self, buf=None, columns=None, col_space=None, colSpace=None,
Render a DataFrame to a tabular environment table.
You can splice this into a LaTeX document.
"""

import warnings
if force_unicode is not None: # pragma: no cover
warnings.warn("force_unicode is deprecated, it will have no "
"effect", FutureWarning)

if colSpace is not None: # pragma: no cover
warnings.warn("colSpace is deprecated, use col_space",
FutureWarning)
col_space = colSpace

formatter = fmt.DataFrameFormatter(self, buf=buf, columns=columns,
col_space=col_space, na_rep=na_rep,
header=header, index=index,
Expand Down