def results_to_df(self) -> None:
        """ converts the results dict from search into a dataframe for easier manipulation

        Returns:
            _type_: _description_
        """

        if self.searchable_fields is not None and isinstance(self.searchable_fields, list):
            self.results[ResultsFields.hits] = [r for r in self.results[ResultsFields.hits] if all(s in r for s in self.searchable_fields)]

        self.results_df = pd.DataFrame(self.results[ResultsFields.hits])

        def _get_highlights(content):
            if content == []:
                return None
            elif isinstance(content, (dict, defaultdict)):
                _key = list(content.keys())
                if len(_key) == 0:
                    return None
                if len(_key) > 1:
                    logger.warning(f"found more than 1 highlight. found {_key}. keeping the first only...")
                return content[_key[0]]

        if self.highlights_field in self.results_df:
            self.results_df[self.highlights_field] = self.results_df[self.highlights_field].apply(_get_highlights)
 converts the results dict from search into a dataframe for easier manipulation

        Returns:
            _type_: _description_
        
src/marqo/s2_inference/reranking/cross_encoders.py