def frequency_counts(df, cols):
    """Get an overview over how many unicates, duplicates etc. this column contains.
  
  Answers the following question: How many entries appear
  exactly one time in the dataset? How many appear twice?
  How many appear X times?
  
  Returns a PySpark Dataframe.
  """
    if type(cols) == str:
        cols = [cols]
    return df.groupBy(cols).count().withColumnRenamed('count', 'freq').groupBy(
        'freq').count().withColumnRenamed('count', 'counts').orderBy('freq',
        ascending=True)
