Skip to content
Prev Previous commit
Next Next commit
Merged from pandas/master, retaining sparsify parameter.
  • Loading branch information
agartland committed Mar 28, 2017
commit b4836c7e7f1c15102f40b4c08cb4b40a66428a64
12 changes: 10 additions & 2 deletions pandas/formats/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,11 @@ def to_latex(self, column_format=None, longtable=False, encoding=None,
"""

latex_renderer = LatexFormatter(self, column_format=column_format,
longtable=longtable, sparsify=self.sparsify)
longtable=longtable,
multicolumn=multicolumn,
multicolumn_format=multicolumn_format,
multirow=multirow,
sparsify=self.sparsify)

if encoding is None:
encoding = 'ascii' if compat.PY2 else 'utf-8'
Expand Down Expand Up @@ -829,12 +833,16 @@ class LatexFormatter(TableFormatter):
HTMLFormatter
"""

def __init__(self, formatter, column_format=None, longtable=False, sparsify=True):
def __init__(self, formatter, column_format=None, longtable=False,
multicolumn=False, multicolumn_format=None, multirow=False, sparsify=True):
self.fmt = formatter
self.frame = self.fmt.frame
self.column_format = column_format
self.longtable = longtable
self.sparsify = sparsify
self.multicolumn = multicolumn
self.multicolumn_format = multicolumn_format
self.multirow = multirow

def write_result(self, buf):
"""
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.