parameters: (self, other)
docstring: validate against an existing table
docstring_summary: validate against an existing table
docstring_tokens: validate against an existing table
function: def validate(self, other):
          """ validate against an existing table """
          if other is None:
              return
  
          if other.table_type != self.table_type:
              raise TypeError(
                  "incompatible table_type with existing "
                  "[{other} - {self}]".format(
                      other=other.table_type, self=self.table_type))
  
          for c in ['index_axes', 'non_index_axes', 'values_axes']:
              sv = getattr(self, c, None)
              ov = getattr(other, c, None)
              if sv != ov:
  
                  # show the error for the specific axes
                  for i, sax in enumerate(sv):
                      oax = ov[i]
                      if sax != oax:
                          raise ValueError(
                              "invalid combinate of [{c}] on appending data "
                              "[{sax}] vs current table [{oax}]".format(
                                  c=c, sax=sax, oax=oax))
  
                  # should never get here
                  raise Exception(
                      "invalid combinate of [{c}] on appending data [{sv}] vs "
                      "current table [{ov}]".format(c=c, sv=sv, ov=ov))
function_tokens: def validate ( self , other ) : if other is None : return if other . table_type != self . table_type : raise TypeError ( "incompatible table_type with existing " "[{other} - {self}]" . format ( other = other . table_type , self = self . table_type ) ) for c in [ 'index_axes' , 'non_index_axes' , 'values_axes' ] : sv = getattr ( self , c , None ) ov = getattr ( other , c , None ) if sv != ov : # show the error for the specific axes for i , sax in enumerate ( sv ) : oax = ov [ i ] if sax != oax : raise ValueError ( "invalid combinate of [{c}] on appending data " "[{sax}] vs current table [{oax}]" . format ( c = c , sax = sax , oax = oax ) ) # should never get here raise Exception ( "invalid combinate of [{c}] on appending data [{sv}] vs " "current table [{ov}]" . format ( c = c , sv = sv , ov = ov ) )