code: def prep_background_frequency(df):
      df["rank"] = rankdata(df.background, method="dense")
      df["background"] = df["rank"] / df["rank"].max()
      return df["background"]
  
file_path: scattertext/scattertext/frequencyreaders/DefaultBackgroundFrequencies.py
imports: import pkgutil
  from io import StringIO
  import pandas
  from scipy.stats import rankdata
label_desc: Use image node_id 1 for calling the BackgroundFrequencyDataFramePreparer obj's underlying member method code with example usage: obj.prep_background_frequency(df) and returns: df