code: def remove_names(self, dtype):
          
          if dtype not in self.ancestry:
              return
          if dtype in self.tables:
              # remove extra columns here
              self_ind = self.ancestry.index(dtype)
              parent_ind = self_ind + 1 if self_ind < (len(self.ancestry) -1) else self_ind
              remove = set(self.ancestry).difference([self.ancestry[self_ind], self.ancestry[parent_ind]])
              remove = [dtype[:-1] for dtype in remove]
              columns = self.tables[dtype].df.columns.difference(remove)
              return self.tables[dtype].df[columns]
docs: Remove unneeded name columns ('specimen'/'sample'/etc)
          from the specified table.
  
          Parameters
          ----------
          dtype : str
  
          Returns
          ---------
          pandas DataFrame without the unneeded columns
  
          Example
          ---------
          Contribution.tables['specimens'].df = Contribution.remove_names('specimens')
          # takes out 'location', 'site', and/or 'sample' columns from the
          # specimens dataframe if those columns have been added