Skip to content

Commit 15bcc0a

Browse files
Christopher Whelanwesm
Christopher Whelan
authored andcommitted
Add parameter deprecation warnings
1 parent 2c7e350 commit 15bcc0a

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

pandas/core/frame.py

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1517,7 +1517,7 @@ def to_string(self, buf=None, columns=None, col_space=None, colSpace=None,
15171517
def to_html(self, buf=None, columns=None, col_space=None, colSpace=None,
15181518
header=True, index=True, na_rep='NaN', formatters=None,
15191519
float_format=None, sparsify=None, index_names=True,
1520-
justify=None, force_unicode=False, bold_rows=True,
1520+
justify=None, force_unicode=None, bold_rows=True,
15211521
classes=None):
15221522
"""
15231523
to_html-specific options
@@ -1527,8 +1527,12 @@ def to_html(self, buf=None, columns=None, col_space=None, colSpace=None,
15271527
Render a DataFrame to an html table.
15281528
"""
15291529

1530+
import warnings
1531+
if force_unicode is not None: # pragma: no cover
1532+
warnings.warn("force_unicode is deprecated, it will have no "
1533+
"effect", FutureWarning)
1534+
15301535
if colSpace is not None: # pragma: no cover
1531-
import warnings
15321536
warnings.warn("colSpace is deprecated, use col_space",
15331537
FutureWarning)
15341538
col_space = colSpace
@@ -1551,7 +1555,7 @@ def to_html(self, buf=None, columns=None, col_space=None, colSpace=None,
15511555
def to_latex(self, buf=None, columns=None, col_space=None, colSpace=None,
15521556
header=True, index=True, na_rep='NaN', formatters=None,
15531557
float_format=None, sparsify=None, index_names=True,
1554-
bold_rows=True):
1558+
bold_rows=True, force_unicode=None):
15551559
"""
15561560
to_latex-specific options
15571561
bold_rows : boolean, default True
@@ -1560,6 +1564,17 @@ def to_latex(self, buf=None, columns=None, col_space=None, colSpace=None,
15601564
Render a DataFrame to a tabular environment table.
15611565
You can splice this into a LaTeX document.
15621566
"""
1567+
1568+
import warnings
1569+
if force_unicode is not None: # pragma: no cover
1570+
warnings.warn("force_unicode is deprecated, it will have no "
1571+
"effect", FutureWarning)
1572+
1573+
if colSpace is not None: # pragma: no cover
1574+
warnings.warn("colSpace is deprecated, use col_space",
1575+
FutureWarning)
1576+
col_space = colSpace
1577+
15631578
formatter = fmt.DataFrameFormatter(self, buf=buf, columns=columns,
15641579
col_space=col_space, na_rep=na_rep,
15651580
header=header, index=index,

0 commit comments

Comments
 (0)