sentinelhub.data_utils

Module with statistics to dataframe transformation.

sentinelhub.data_utils.statistical_to_dataframe(result_data, exclude_stats=None)[source]

Transform (Batch) Statistical API results into a pandas.DataFrame

This function has a dependency of the pandas library, which is not a requirement of sentinelhub-py and needs to be installed before using the function.

Parameters:
  • result_data (list[Dict[str, Any]]) – An input representation of (Batch) Statistical API result returned from AwsBatchStatisticalResults.get_data(). Each JsonDict in the list is a Statistical API response of an input geometry.

  • exclude_stats (list[str] | None) – The statistic names defined in this parameter will be excluded from the output DataFrame.

Returns:

Statistical dataframe.

Return type:

Any

sentinelhub.data_utils.get_failed_statistical_requests(result_data)[source]

Collect failed requests of (Batch) Statistical Results

Parameters:

result_data (list[Dict[str, Any]]) – An input representation of (Batch) Statistical API result.

Returns:

Failed requests of (Batch) Statistical Results.

Return type:

list[Dict[str, Any]]