bayesline.api.equity.AsyncUniverseCountReportAccessor#
- class bayesline.api.equity.AsyncUniverseCountReportAccessor(accessor: AsyncReportAccessorApi)#
Specific accessor for a universe count report.
- abstract __init__(accessor: AsyncReportAccessorApi)#
Methods
__init__(accessor)get_counts(*[, dates, ...])Get the counts for the universe.
with_scenario(scenario_settings)Return a new accessor with the given scenario settings applied.
Attributes
accessorThe underlying report accessor API.
scenario_types- abstract async get_counts(*, dates: bool = True, categorical_hierarchy_levels: dict[str, int] | None = None) DataFrame#
Get the counts for the universe.
Parameters#
- datesbool, default=True
If True, groups by dates.
- categorical_hierarchy_levelsdict[str, int] | None, default=None
The level of categorical aggregation to group by. The key is the hierarchy name, the value is the level. If None, no categorical aggregation is done. A level of -1 means to use all levels.
Returns#
- pl.DataFrame
A dataframe with [date, count] columns.