sc2_datasets.transforms.pandas.avg_playerstats_pd_dict¶
Functions¶
|
Exposes logic for composing a row containing features for a classification task. |
Module Contents¶
- avg_playerstats_pd_dict_transform(sc2_replay: sc2_datasets.replay_data.sc2_replay_data.SC2ReplayData) dict[str, int | float]¶
Exposes logic for composing a row containing features for a classification task.
- Parameters:
sc2_replay (SC2ReplayData) – Specifies the parsed structure of a replay.
- Returns:
Returns a dictionary representation of the averaged values.
- Return type:
dict[str, float]
Examples
Correct Usage Examples:
This method may help you to transforming reply to the dict type.
You should set sc2_replay parameter.
The parameters should be set as in the example below.
>>> avg_playerstats_pd_dict_transform_object = avg_playerstats_pd_dict_transform( ... sc2_replay= sc2_replay: SC2ReplayData)
>>> assert isinstance(sc2_replay, SC2ReplayData)
Incorrect Usage Examples:
>>> wrong_type_object = int(2) >>> avg_playerstats_pd_dict_transform_object = avg_playerstats_pd_dict_transform( ... sc2_replay= wrong_type_object) Traceback (most recent call last): ... TypeError: unsupported operand type(s) ...
If you don’t set parameters or paste incorect parameters’ type.