code: def get_term_freq_df(self, label_append=' freq'):
          '''
          Parameters
          -------
          label_append : str
  
          Returns
          -------
          pd.DataFrame indexed on terms, with columns giving frequencies for each
          '''
  
          '''
          row = self._row_category_ids()
          newX = csr_matrix((self._X.data, (row, self._X.indices)))
          return self._term_freq_df_from_matrix(newX)
          '''
          mat = self.get_term_freq_mat()
          return pd.DataFrame(mat,
                              index=pd.Series(self.get_terms(), name='term'),
                              columns=[c + label_append for c in self.get_categories()]f get_term_freq_df(self, label_append=' freq'):
          '''
          Parameters
          -------
          label_append : str
  
          Returns
          -------
          pd.DataFrame indexed on terms, with columns giving frequencies for each
          '''
  
          '''
          row = self._row_category_ids()
          newX = csr_matrix((self._X.data, (row, self._X.indices)))
          return self._term_freq_df_from_matrix(newX)
          '''
          mat = self.get_term_freq_mat()
          return pd.DataFrame(mat,
                              index=pd.Series(self.get_terms(), name='term'),
                              columns=[c + label_append for c in self.get_categories()])
docs: Parameters
          -------
          label_append : str
  
          Returns
          -------
          pd.DataFrame indexed on terms, with columns giving frequencies for each