Skip to content

default aggregation columns #468

@tomjemmett

Description

@tomjemmett

return results.groupby(["pod", "sitetret", *args, "measure"])["value"].sum()

currently, when we create aggregations we add the pod, sitetret, and measure columns to the groupings.

the sitetret column makes sense for provider based model runs, but for national, regional, icb level runs we might want to select something else.

we should add an argument to the model when we instantiate to choose the default columns to aggregate over, then make the function above return

    return results.groupby([*self._default_agg_columns, *args, "measure"])["value"].sum() 

this should be an argument to Model (and InpatientsModel, OutpatientsModel, AaEModel, passing through to Model) which is then set in the __init__ method

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions