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 "
                  f"[{other.table_type} - {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(
                              f"invalid combination of [{c}] on appending data "
                              f"[{sax}] vs current table [{oax}]"
                          )
  
                  # should never get here
                  raise Exception(
                      f"invalid combination of [{c}] on appending data [{sv}] vs "
                      f"current table [{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 " f"[{other.table_type} - {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 ( f"invalid combination of [{c}] on appending data " f"[{sax}] vs current table [{oax}]" ) # should never get here raise Exception ( f"invalid combination of [{c}] on appending data [{sv}] vs " f"current table [{ov}]" )