Add following at the end of your Flux query:
from(bucket:.. ... |> last() |> pivot(rowKey: ["_time"], columnKey: ["_field"], valueColumn: "_value")