gamebench_api_client.api.utilities package

Submodules

gamebench_api_client.api.utilities.dataframe_utilities module

gamebench_api_client.api.utilities.dataframe_utilities.json_to_normalized_dataframe(response_json)[source]

Normalizes a semi-structured JSON data into a flat table.

This is necessary for time-series and other similarly-structured objects.

Parameters:response_json – Response JSON returned from session request.
Return normalized_dataframe:
 Pandas DataFrame containing normalized JSON data.
gamebench_api_client.api.utilities.dataframe_utilities.session_detail_to_dataframe(metric, response_json)[source]

Creates a Pandas DataFrame for non-time-series session detail.

The session summary object contains multiple inner dictionaries. This method should be used to get one of those metrics and put the values into a DataFrame.

Parameters:
  • metric – The specific dictionary needed from the response json (eg: app, device, metric).
  • response_json – response json returned from a session request.
Returns:

Pandas DataFrame generated by a single session request json dictionary.

gamebench_api_client.api.utilities.dataframe_utilities.to_dataframe(response_json)[source]

Create a Pandas DataFrame object from a Session response json.

Parameters:response_json – response json returned from a session request.
Returns:Pandas DataFrame generated by an entire session response json.

Module contents