def print_structure(self, output=sys.stdout): """ Print the column names and their respective types :param table: A :class:`Table` instance. :param output: The output used to print the structure of the :class:`Table`. :returns: None """ print_structure(self, output)
def print_structure(self, output=sys.stdout): """ Print the column names and their respective types :param table: A :class:`Table` instance. :param output: The output used to print the structure of the :class:`Table`. :returns: None """ left_column = [n for n in self.column_names] right_column = [t.__class__.__name__ for t in self.column_types] column_headers = ['column_names', 'column_types'] print_structure(left_column, right_column, column_headers, output)
def print_structure(self, max_rows=20, output=sys.stdout): """ Print the keys and row counts of each table in the tableset. :param max_rows: The maximum number of rows to display before truncating the data. Defaults to 20. :param output: The output used to print the structure of the :class:`Table`. :returns: None """ max_length = min(len(self.items()), max_rows) left_column = self.keys()[0:max_length] right_column = [str(len(table.rows)) for key, table in self.items()[0:max_length]] column_headers = ['table_keys', 'row_count'] print_structure(left_column, right_column, column_headers, output)
def print_structure(self, max_rows=20, output=sys.stdout): """ Print the keys and row counts of each table in the tableset. :param max_rows: The maximum number of rows to display before truncating the data. Defaults to 20. :param output: The output used to print the structure of the :class:`Table`. :returns: None """ max_length = min(len(self.items()), max_rows) left_column = self.keys()[0:max_length] right_column = [ str(len(table.rows)) for key, table in self.items()[0:max_length] ] column_headers = ['table_keys', 'row_count'] print_structure(left_column, right_column, column_headers, output)