# NaN vs None in historical query results

**URL:** <https://forum.inductiveautomation.com/t/nan-vs-none-in-historical-query-results/52476>\
**Category:** Ignition\
**Created:** [October 28, 2021, 7:22pm UTC](https://forum.inductiveautomation.com/t/nan-vs-none-in-historical-query-results/52476 "2021-10-28T19:22:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![justin.brzozoski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justin.brzozoski/32/13452_2.png) [@justin.brzozoski](https://forum.inductiveautomation.com/u/justin.brzozoski)\
**Post date:** [October 28, 2021, 7:22pm UTC](https://forum.inductiveautomation.com/t/nan-vs-none-in-historical-query-results/52476/1 "2021-10-28T19:22:26Z")

</div>

Running the same historical query via both a Perspective binding and a scripted call to `queryTagHistory`, I’ve found that cells in the dataset that return `None` on float columns via Perspective are returning `NaN` via the scripted one.

The way I bumped into this was using a Wide, AsStored, IgnoreBadQuality=True, PreventInterpolation=False, Format=Dataset Perspective query with at least two float columns that change at different times. One will change first, and the other will have None until it eventually changes.

Then, creating a matching returnSize=-1, returnFormat=Wide, noInterpolation=False, ignoreBadQuality=True scripted query on the same tags and time range, those cells will have NaN.

I’m here grumbling since this broke one of my scripts that analyzes historical data and I lost a couple hours trying to figure out what was going on. Now I’ve updated that script to find NaN float cells via `math.isnan()` and treat them the same as cells with `None` and it’s all working again.

(Ignition 8.1.7)
