v0.5.7
In this release, we're introducing a new configuration setting called GROUP_BY_COLUMN
. This feature enables the creation of aggregated results based on specified groups.
To generate results grouped by a specific column, such as product_code
, configure the settings as shown below:
settings.py
settings = {
"AGGREGATE": True,
"GROUP_BY_COLUMN": "product_code",
...
}
Please note that the product_code
column must be part of the main
model point set, as demonstrated below:
input.py
main = ModelPointSet(data=pd.DataFrame({
"id": [1, 2, 3],
"product_code": ["A", "B", "A"]
}))
The output will provide aggregated results grouped by the chosen column, for example:
t,product_code,fund_value
0,A,24000
1,A,24048
2,A,24096.1
3,A,24144.29
0,B,3000
1,B,3006
2,B,3012.01
3,B,3018.03