code: def _match_with_pandas(filtered, matcher):
      
  
      import pandas
  
      data = [fl.to_dict() for fl in filtered]
  
      if not data:
          return []
  
      df = pandas.DataFrame(data)
      df = df.sort_values(['uuid'])
  
      cdfs = []
      criteria = matcher.matching_criteria()
  
      for c in criteria:
          cdf = df[['id', 'uuid', c]]
          cdf = cdf.dropna(subset=[c])
          cdf = pandas.merge(cdf, cdf, on=c, how='left')
          cdf = cdf[['uuid_x', 'uuid_y']]
          cdfs.append(cdf)
  
      result = pandas.concat(cdfs)
      result = result.drop_duplicates()
      groups = result.groupby(by=['uuid_x'],
                              as_index=True, sort=True)
  
      matched = _calculate_matches_closures(groups)
  
      return matched
docs: Find matches in a set using Pandas' library.