I\'m extracting some data from BigQuery using the Python client library and I\'m trying to transform the output into the following format: