MCPcopy
hub / github.com/pandas-dev/pandas / _generate_body

Method _generate_body

pandas/io/formats/excel.py:857–871  ·  view source on GitHub ↗
(self, coloffset: int)

Source from the content-addressed store, hash-verified

855 return is_list_like(self.header)
856
857 def _generate_body(self, coloffset: int) -> Iterable[ExcelCell]:
858 # Write the body of the frame data series by series.
859 for colidx in range(len(self.columns)):
860 series = self.df.iloc[:, colidx]
861 for i, val in enumerate(series):
862 yield CssExcelCell(
863 row=self.rowcounter + i,
864 col=colidx + coloffset,
865 val=val,
866 style=None,
867 css_styles=getattr(self.styler, "ctx", None),
868 css_row=i,
869 css_col=colidx,
870 css_converter=self.style_converter,
871 )
872
873 def get_formatted_cells(self) -> Iterable[ExcelCell]:
874 for cell in itertools.chain(self._format_header(), self._format_body()):

Callers 2

_format_regular_rowsMethod · 0.95

Calls 1

CssExcelCellClass · 0.85

Tested by

no test coverage detected