code: def drop_duplicate_rows(self, ignore_cols=['specimen', 'sample']):
          
          # keep any row with a unique index
          unique_index = self.df.index.unique()
          cond1 = ~self.df.index.duplicated(keep=False)
          # or with actual data
          ignore_cols = [col for col in ignore_cols if col in self.df.columns]
          relevant_df = self.df.drop(ignore_cols, axis=1)
          cond2 = relevant_df.notnull().any(axis=1)
          orig_len = len(self.df)
          new_df = self.df[cond1 | cond2]
          # make sure we haven't lost anything important
          if any(unique_index.difference(new_df.index.unique())):
                  cond1 = ~self.df.index.duplicated(keep="first")
          self.df = self.df[cond1 | cond2]
          end_len = len(self.df)
          removed = orig_len - end_len
          if removed:
              print('-I- Removed {} redundant records from {} table'.format(removed, self.dtype))
          return self.df
docs: Drop self.df rows that have only null values,
          ignoring certain columns BUT only if those rows
          do not have a unique index.
  
          Different from drop_stub_rows because it only drops
          empty rows if there is another row with that index.
  
          Parameters
          ----------
          ignore_cols : list_like
              list of colum names to ignore
  
          Returns
          ----------
          self.df : pandas DataFrame