class_docstr: Encapsulation of a query execution's result
class_docstr_tok: ["Encapsulation","of","a","query","execution","'s","result"]
docstr: Returns the data of the query results as a list of dicts mapping headers to values
  
  An alternative to data_as_list. The returned result is a list of rows, but in this method
  the rows are dicts, mapping the headers (keys) to their respective values.
  
  This method results in a larger data set and is more CPU intensive but the returned data
  is easier to use.
  
  Returns:
      list[dict]
docstr_tok: ["Returns","the","data","of","the","query","results","as","a","list","of","dicts","mapping","headers","to","values","An","alternative","to","data_as_list",".","The","returned","result","is","a","list","of","rows",",","but","in","this","method","the","rows","are","dicts",",","mapping","the","headers","(","keys",")","to","their","respective","values",".","This","method","results","in","a","larger","data","set","and","is","more","CPU","intensive","but","the","returned","data","is","easier","to","use",".","Returns",":","list","[","dict","]"]
code: def data_as_dicts(self):
      """Returns the data of the query results as a list of dicts mapping headers to values
  
      An alternative to data_as_list. The returned result is a list of rows, but in this method
      the rows are dicts, mapping the headers (keys) to their respective values.
  
      This method results in a larger data set and is more CPU intensive but the returned data
      is easier to use.
  
      Returns:
          list[dict]
      """
      headers = self.headers
  
      data = []
      for row in self.data_as_list:
          dict_row = {}
          for index, header in enumerate(headers):
              dict_row[header] = row[index]
          data.append(dict_row)
      return data
  
imports: import json
  import uuid
  from botocore.exceptions import ClientError
label_desc: Use image node_id 5 for calling the AthenaQueryResult obj's underlying member method code with example usage: obj.data_as_dicts() and returns: data