Grafana Table and Influx Data Explorer not showing the same format

I have the following flux query which displays correctly in the influxdb Data Explorer, but when I put the query into Grafana it does not. Not sure which option I need to correct this.

Flux Query

from(bucket: "es-cisco-mdt")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_measurement"] == "Cisco-IOS-XE-cdp-oper:cdp-neighbor-details/cdp-neighbor-detail")
  |> filter(fn: (r) => r["_field"] == "ip_address" or r["_field"] == "device_name" or r["_field"] == "port_id")
  |> pivot(rowKey: ["_time"], columnKey: ["_field"], valueColumn: "_value")
  |> keep(columns: ["device_name", "ip_address", "port_id"])
  |> group(columns: ["port_id"])
  |> last(column: "port_id")

What it looks like in Influxdb Data Explorer

But looks like this in Grafana:

Any help would be appreciated