Skip to content

Commit b2a1445

Browse files
gfyoungjreback
authored andcommitted
CLN: Removed colSpace parameter (pandas-dev#13857)
1 parent 9b2797d commit b2a1445

File tree

2 files changed

+11
-21
lines changed

2 files changed

+11
-21
lines changed

doc/source/whatsnew/v0.19.0.txt

+1
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,7 @@ Deprecations
671671
- ``Categorical.reshape`` has been deprecated and will be removed in a subsequent release (:issue:`12882`)
672672
- ``Series.reshape`` has been deprecated and will be removed in a subsequent release (:issue:`12882`)
673673

674+
- ``DataFrame.to_html()`` and ``DataFrame.to_latex()`` have dropped the ``colSpace`` parameter in favor of ``col_space`` (:issue:`13857`)
674675
- ``DataFrame.to_sql()`` has deprecated the ``flavor`` parameter, as it is superfluous when SQLAlchemy is not installed (:issue:`13611`)
675676
- ``compact_ints`` and ``use_unsigned`` have been deprecated in ``pd.read_csv()`` and will be removed in a future version (:issue:`13320`)
676677
- ``buffer_lines`` has been deprecated in ``pd.read_csv()`` and will be removed in a future version (:issue:`13360`)

pandas/core/frame.py

+10-21
Original file line numberDiff line numberDiff line change
@@ -1556,12 +1556,11 @@ def to_string(self, buf=None, columns=None, col_space=None, header=True,
15561556
return result
15571557

15581558
@Appender(fmt.docstring_to_string, indents=1)
1559-
def to_html(self, buf=None, columns=None, col_space=None, colSpace=None,
1560-
header=True, index=True, na_rep='NaN', formatters=None,
1561-
float_format=None, sparsify=None, index_names=True,
1562-
justify=None, bold_rows=True, classes=None, escape=True,
1563-
max_rows=None, max_cols=None, show_dimensions=False,
1564-
notebook=False, decimal='.'):
1559+
def to_html(self, buf=None, columns=None, col_space=None, header=True,
1560+
index=True, na_rep='NaN', formatters=None, float_format=None,
1561+
sparsify=None, index_names=True, justify=None, bold_rows=True,
1562+
classes=None, escape=True, max_rows=None, max_cols=None,
1563+
show_dimensions=False, notebook=False, decimal='.'):
15651564
"""
15661565
Render a DataFrame as an HTML table.
15671566
@@ -1585,11 +1584,6 @@ def to_html(self, buf=None, columns=None, col_space=None, colSpace=None,
15851584
.. versionadded:: 0.18.0
15861585
"""
15871586

1588-
if colSpace is not None: # pragma: no cover
1589-
warnings.warn("colSpace is deprecated, use col_space",
1590-
FutureWarning, stacklevel=2)
1591-
col_space = colSpace
1592-
15931587
formatter = fmt.DataFrameFormatter(self, buf=buf, columns=columns,
15941588
col_space=col_space, na_rep=na_rep,
15951589
formatters=formatters,
@@ -1609,11 +1603,11 @@ def to_html(self, buf=None, columns=None, col_space=None, colSpace=None,
16091603
return formatter.buf.getvalue()
16101604

16111605
@Appender(fmt.common_docstring + fmt.return_docstring, indents=1)
1612-
def to_latex(self, buf=None, columns=None, col_space=None, colSpace=None,
1613-
header=True, index=True, na_rep='NaN', formatters=None,
1614-
float_format=None, sparsify=None, index_names=True,
1615-
bold_rows=True, column_format=None, longtable=None,
1616-
escape=None, encoding=None, decimal='.'):
1606+
def to_latex(self, buf=None, columns=None, col_space=None, header=True,
1607+
index=True, na_rep='NaN', formatters=None, float_format=None,
1608+
sparsify=None, index_names=True, bold_rows=True,
1609+
column_format=None, longtable=None, escape=None,
1610+
encoding=None, decimal='.'):
16171611
"""
16181612
Render a DataFrame to a tabular environment table. You can splice
16191613
this into a LaTeX document. Requires \\usepackage{booktabs}.
@@ -1642,11 +1636,6 @@ def to_latex(self, buf=None, columns=None, col_space=None, colSpace=None,
16421636
.. versionadded:: 0.18.0
16431637
16441638
"""
1645-
1646-
if colSpace is not None: # pragma: no cover
1647-
warnings.warn("colSpace is deprecated, use col_space",
1648-
FutureWarning, stacklevel=2)
1649-
col_space = colSpace
16501639
# Get defaults from the pandas config
16511640
if longtable is None:
16521641
longtable = get_option("display.latex.longtable")

0 commit comments

Comments
 (0)