def as_dataframe(self, fillna=True, subjects=None):
        """
        Return association set as pandas DataFrame

        Each row is a subject (e.g. gene)
        Each column is the inferred class used to describe the subject
        """
        entries = []
        selected_subjects = self.subjects
        if subjects is not None:
            selected_subjects = subjects
            
        for s in selected_subjects:
            vmap = {}
            for c in self.inferred_types(s):
                vmap[c] = 1
            entries.append(vmap)
        logging.debug("Creating DataFrame")
        df = pd.DataFrame(entries, index=selected_subjects)
        if fillna:
            logging.debug("Performing fillna...")
            df = df.fillna(0)
        return df
Return association set as pandas DataFrame

        Each row is a subject (e.g. gene)
        Each column is the inferred class used to describe the subject