seismometer.data.summaries.default_cohort_summaries

seismometer.data.summaries.default_cohort_summaries(dataframe, attribute, options, entity_id_col)

Generate a dataframe of summary counts from the input dataframe.

Parameters:
  • dataframe (pd.DataFrame) – The input dataframe.

  • attribute (str) – The attribute to generate summary levels for.

  • options (list[str]) – An ordered list of options to reindex the dataframe on.

  • entity_id_col (str) – The column name for the dataframe column containing the entity identifier.

Returns:

A dataframe of summary counts.

Return type:

pd.DataFrame