def show(self, header=True): #if h2o.can_use_pandas(): # import pandas # pandas.options.display.max_rows = 20 # print pandas.DataFrame(self.cell_values,columns=self.col_header) # return print if header: print self.table_header + ":", if self.table_description: print self.table_description print table = copy.deepcopy(self.cell_values) nr = 0 if _is_list_of_lists(table): nr = len( table ) # only set if we truly have multiple rows... not just one long row :) if nr > 20: # create a truncated view of the table, first/last 5 rows trunc_table = [] trunc_table += [v for v in table[:5]] trunc_table.append(["---"] * len(table[0])) trunc_table += [v for v in table[(nr - 5):]] table = trunc_table h2o.H2ODisplay(table, self.col_header, numalign="left", stralign="left")
def show(self, header=True): print if header: print self.table_header + ":" print table = copy.deepcopy(self.cell_values) nr=0 if _is_list_of_lists(table): nr = len(table) # only set if we truly have multiple rows... not just one long row :) if nr > 20: # create a truncated view of the table, first/last 5 rows trunc_table =[] trunc_table += [ v for v in table[:5]] trunc_table.append(["---"]*len(table[0])) trunc_table += [v for v in table[(nr-5):]] table = trunc_table h2o.H2ODisplay(table, self.col_header, numalign="left", stralign="left")
def show(self, header=True): #if h2o.can_use_pandas(): # import pandas # pandas.options.display.max_rows = 20 # print pandas.DataFrame(self.cell_values,columns=self.col_header) # return print if header: print self.table_header + ":", if self.table_description: print self.table_description print table = copy.deepcopy(self.cell_values) nr=0 if _is_list_of_lists(table): nr = len(table) # only set if we truly have multiple rows... not just one long row :) if nr > 20: # create a truncated view of the table, first/last 5 rows trunc_table =[] trunc_table += [ v for v in table[:5]] trunc_table.append(["---"]*len(table[0])) trunc_table += [v for v in table[(nr-5):]] table = trunc_table h2o.H2ODisplay(table, self.col_header, numalign="left", stralign="left")