code: def _add_term_freq_to_json_df(self, json_df, term_freq_df, category):
      json_df = ScatterChart._add_term_freq_to_json_df(
          self, json_df, term_freq_df, category
      ).assign(
          cat=term_freq_df[str(category) + " freq"].astype(int),
          ncat=term_freq_df["not cat freq"].astype(int),
      )
      # json_df.loc[:,'cat'] = term_freq_df[category + ' freq'].astype(int)
      # json_df.loc[:,'ncat'] = term_freq_df['not cat freq'].astype(int)
      if self._term_metadata is not None:
          json_df = json_df.assign(
              etc=term_freq_df["term"].apply(
                  lambda term: self._term_metadata.get(term, {})
              )
          )
  
      return json_df
  
file_path: scattertext/scattertext/ScatterChartExplorer.py
imports: import logging
  import numpy
  import pandas
  from scattertext.ScatterChart import ScatterChart
  from scattertext.Scalers import percentile_alphabetical
  from scattertext.DocsAndLabelsFromCorpus import DocsAndLabelsFromCorpus, DocsAndLabelsFromCorpusSample
label_desc: Use image node_id 6 for calling the ScatterChartExplorer obj's underlying member method code with example usage: obj._add_term_freq_to_json_df(json_df, term_freq_df, category) and returns: json_df