h2o-py/h2o/two_dim_table.py
def show(self, header=True):
        """Print the contents of this table."""
        # if h2o.can_use_pandas():
        #  import pandas
        #  pandas.options.display.max_rows = 20
        #  print pandas.DataFrame(self._cell_values,columns=self._col_header)
        #  return
        if header and self._table_header:
            print(self._table_header + ":", end=' ')
            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

        H2ODisplay(table, self._col_header, numalign="left", stralign="left")
        if nr > 20 and can_use_pandas(): print('\nSee the whole table with table.as_data_frame()')
def show(self, header=True):
        """Print the contents of this table."""
        # if h2o.can_use_pandas():
        #  import pandas
        #  pandas.options.display.max_rows = 20
        #  print pandas.DataFrame(self._cell_values,columns=self._col_header)
        #  return
        if header and self._table_header:
            print(self._table_header + ":", end=' ')
            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

        H2ODisplay(table, self._col_header, numalign="left", stralign="left")
        if nr > 20 and can_use_pandas(): print('\nSee the whole table with table.as_data_frame()')
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 if header and self . _table_header : print ( self . _table_header + ":" , end = ' ' ) 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 H2ODisplay ( table , self . _col_header , numalign = "left" , stralign = "left" ) if nr > 20 and can_use_pandas ( ) : print ( '\nSee the whole table with table.as_data_frame()' )
Print the contents of this table.
Print the contents of this table .