def _to_str_columns(self):
frame = self.tr_frame<EOL>str_index = self._get_formatted_index(frame)<EOL>if not is_list_like(self.header) and not self.header:<EOL><INDENT>stringified = []<EOL>for i, c in enumerate(frame):<EOL><INDENT>fmt_values = self._format_col(i)<EOL>fmt_values = _make_fixed_width(fmt_values, self.justify,<EOL>minimum=(self.col_space or <NUM_LIT:0>),<EOL>adj=self.adj)<EOL>stringified.append(fmt_values)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if is_list_like(self.header):<EOL><INDENT>if len(self.header) != len(self.columns):<EOL><INDENT>raise ValueError(('<STR_LIT>'<EOL>'<STR_LIT>'<EOL>.format(ncols=len(self.columns),<EOL>nalias=len(self.header))))<EOL><DEDENT>str_columns = [[label] for label in self.header]<EOL><DEDENT>else:<EOL><INDENT>str_columns = self._get_formatted_column_labels(frame)<EOL><DEDENT>if self.show_row_idx_names:<EOL><INDENT>for x in str_columns:<EOL><INDENT>x.append('<STR_LIT>')<EOL><DEDENT><DEDENT>stringified = []<EOL>for i, c in enumerate(frame):<EOL><INDENT>cheader = str_columns[i]<EOL>header_colwidth = max(self.col_space or <NUM_LIT:0>,<EOL>*(self.adj.len(x) for x in cheader))<EOL>fmt_values = self._format_col(i)<EOL>fmt_values = _make_fixed_width(fmt_values, self.justify,<EOL>minimum=header_colwidth,<EOL>adj=self.adj)<EOL>max_len = max(max(self.adj.len(x) for x in fmt_values),<EOL>header_colwidth)<EOL>cheader = self.adj.justify(cheader, max_len, mode=self.justify)<EOL>stringified.append(cheader + fmt_values)<EOL><DEDENT><DEDENT>strcols = stringified<EOL>if self.index:<EOL><INDENT>strcols.insert(<NUM_LIT:0>, str_index)<EOL><DEDENT>truncate_h = self.truncate_h<EOL>truncate_v = self.truncate_v<EOL>if truncate_h:<EOL><INDENT>col_num = self.tr_col_num<EOL>strcols.insert(self.tr_col_num + <NUM_LIT:1>, ['<STR_LIT>'] * (len(str_index)))<EOL><DEDENT>if truncate_v:<EOL><INDENT>n_header_rows = len(str_index) - len(frame)<EOL>row_num = self.tr_row_num<EOL>for ix, col in enumerate(strcols):<EOL><INDENT>cwidth = self.adj.len(strcols[ix][row_num])<EOL>is_dot_col = False<EOL>if truncate_h:<EOL><INDENT>is_dot_col = ix == col_num + <NUM_LIT:1><EOL><DEDENT>if cwidth > <NUM_LIT:3> or is_dot_col:<EOL><INDENT>my_str = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>my_str = '<STR_LIT:..>'<EOL><DEDENT>if ix == <NUM_LIT:0>:<EOL><INDENT>dot_mode = '<STR_LIT:left>'<EOL><DEDENT>elif is_dot_col:<EOL><INDENT>cwidth = <NUM_LIT:4><EOL>dot_mode = '<STR_LIT:right>'<EOL><DEDENT>else:<EOL><INDENT>dot_mode = '<STR_LIT:right>'<EOL><DEDENT>dot_str = self.adj.justify([my_str], cwidth, mode=dot_mode)[<NUM_LIT:0>]<EOL>strcols[ix].insert(row_num + n_header_rows, dot_str)<EOL><DEDENT><DEDENT>return strcols<EOL>
Render a DataFrame to a list of columns (as lists of strings).