def write(self, writer, sheet_name='<STR_LIT>', startrow=<NUM_LIT:0>,<EOL>startcol=<NUM_LIT:0>, freeze_panes=None, engine=None):
from pandas.io.excel import ExcelWriter<EOL>from pandas.io.common import _stringify_path<EOL>if isinstance(writer, ExcelWriter):<EOL><INDENT>need_save = False<EOL><DEDENT>else:<EOL><INDENT>writer = ExcelWriter(_stringify_path(writer), engine=engine)<EOL>need_save = True<EOL><DEDENT>formatted_cells = self.get_formatted_cells()<EOL>writer.write_cells(formatted_cells, sheet_name,<EOL>startrow=startrow, startcol=startcol,<EOL>freeze_panes=freeze_panes)<EOL>if need_save:<EOL><INDENT>writer.save()<EOL><DEDENT>
writer : string or ExcelWriter object
    File path or existing ExcelWriter
sheet_name : string, default 'Sheet1'
    Name of sheet which will contain DataFrame
startrow :
    upper left cell row to dump data frame
startcol :
    upper left cell column to dump data frame
freeze_panes : tuple of integer (length 2), default None
    Specifies the one-based bottommost row and rightmost column that
    is to be frozen
engine : string, default None
    write engine to use if writer is a path - you can also set this
    via the options ``io.excel.xlsx.writer``, ``io.excel.xls.writer``,
    and ``io.excel.xlsm.writer``.