parameters: (self, rows)
return_statement: return table
docstring: Generates from a list of rows a PrettyTable object.
docstring_summary: Generates from a list of rows a PrettyTable object.
docstring_tokens: Generates from a list of rows a PrettyTable object .
function: def generate_table(self, rows):
          """
          Generates from a list of rows a PrettyTable object.
          """
          table = PrettyTable(**self.kwargs)
          for row in self.rows:
              if len(row[0]) < self.max_row_width:
                  appends = self.max_row_width - len(row[0])
                  for i in range(1,appends):
                      row[0].append("-")
  
              if row[1] == True:
                  self.make_fields_unique(row[0])
                  table.field_names = row[0]
              else:
                  table.add_row(row[0])
          return table
function_tokens: def generate_table ( self , rows ) : table = PrettyTable ( * * self . kwargs ) for row in self . rows : if len ( row [ 0 ] ) < self . max_row_width : appends = self . max_row_width - len ( row [ 0 ] ) for i in range ( 1 , appends ) : row [ 0 ] . append ( "-" ) if row [ 1 ] == True : self . make_fields_unique ( row [ 0 ] ) table . field_names = row [ 0 ] else : table . add_row ( row [ 0 ] ) return table