code: def __get_display_df(self):
      display_df = self.rank_df[
          lambda df: df.Rank < self.num_rows
      ].assign(
          Frequency=lambda df: df.Frequency + 0.001,
      )
      bin_boundaries = np.histogram_bin_edges(
          np.log(display_df.Frequency),
          bins=self.max_font_size - self.min_font_size,
      )
      display_df = pd.merge(
          display_df.assign(
              FontSize=lambda df: df.Frequency.apply(np.log).apply(
                  lambda x: bisect_left(bin_boundaries, x)
                  + self.min_font_size
              )
          ).assign(Category=lambda df: df.Category.apply(str)),
          pd.DataFrame(
              {
                  "Category": [str(c) for c in self.category_order_],
                  "CategoryNum": np.arange(len(self.category_order_)),
              }
          ),
          on="Category",
      )
      return display_df
  
file_path: scattertext/scattertext/categorytable/category_table_maker.py
imports: import json
  import types
  from _bisect import bisect_left
  from typing import Optional, Union, Callable
  import numpy
  import pandas
  from scattertext.TermDocMatrix import TermDocMatrix
  from scattertext.all_category_scorers.gmean_l2_freq_associator import AllCategoryScorerGMeanL2
  from scattertext.all_category_scorers.all_category_scorer import AllCategoryScorer
  from scattertext.graphs.ComponentDiGraphHTMLRenderer import GraphRenderer
  from scattertext.viz.HTMLSemioticSquareViz import ClickableTerms
label_desc: Use image node_id 4 for calling the CategoryTableMaker obj's underlying member method code with example usage: obj.__get_display_df() and returns: display_df