nbiatoolkit.utils.conv_response_list

Module Contents

Functions

conv_response_list(→ List[dict[Any, ...)

Function that takes in a list of dictionaries and returns either a list or a dataframe.

nbiatoolkit.utils.conv_response_list.conv_response_list(response_json: List[dict[Any, Any]], return_type: nbiatoolkit.utils.nbia_endpoints.ReturnType) List[dict[Any, Any]] | pandas.DataFrame[source]

Function that takes in a list of dictionaries and returns either a list or a dataframe.

Parameters:
  • response_json (List[dict[Any, Any]]) – A response from the API in the form of a list of dictionaries.

  • return_type (ReturnType) – The desired return type for the response.

Returns:

Either a list of dictionaries or a DataFrame.

Return type:

List[dict[Any, Any]] | pd.DataFrame