def get_metadata_doc_count_df(self, label_append=' freq'):
        '''

        Returns
        -------
        pd.DataFrame indexed on metadata, with columns the number of documents
        each metadata appeared in each category
        '''
        mat = self.get_metadata_count_mat()
        return pd.DataFrame(mat,
                            index=self.get_metadata(),
                            columns=[str(c) + label_append for c in self.get_categories()])


        Returns
        -------
        pd.DataFrame indexed on metadata, with columns the number of documents
        each metadata appeared in each category
        
scattertext/TermDocMatrix.py