def _format_table(self):
        cell_values = defaultdict(dict)
        cell_widths = defaultdict(int)
        for key in self.keys:
            frame = self._get_frame(key)
            if frame is None:
                continue

            # Mapping from the cell coordinates to the dictionary key.
            summarize = frame.rows > self.max_rows
            half_rows = self.max_rows//2
            rows = min([self.max_rows, frame.rows])
            for row in range(rows):
                adjusted_row = row
                for col in range(frame.cols):
                    if summarize and row == half_rows:
                        cell_text = "..."
                    else:
                        if summarize and row > half_rows:
                            adjusted_row = (frame.rows - self.max_rows + row)
                        value = frame.pprint_cell(adjusted_row, col)
                        cell_text = self.pprint_value(value)
                    cell_values[key][(row, col)] = cell_text
                    if len(cell_text) + 2 > cell_widths[col]:
                        cell_widths[col] = len(cell_text) + 2
        return cell_values, cell_widths
dataset/ETHPy150Open ioam/holoviews/holoviews/plotting/mpl/tabular.py/TablePlot._format_table/original