DataFrame: guess number field when on NaN (#19833)

This commit is contained in:
Kyle Brandt
2019-10-16 15:13:27 +02:00
committed by Ryan McKinley
parent 4d214f5aea
commit 1ffcb002db
2 changed files with 4 additions and 1 deletions
@@ -156,7 +156,7 @@ function convertJSONDocumentDataToDataFrame(timeSeries: TimeSeries): DataFrame {
// PapaParse Dynamic Typing regex:
// https://github.com/mholt/PapaParse/blob/master/papaparse.js#L998
const NUMBER = /^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i;
const NUMBER = /^\s*(-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?|NAN)\s*$/i;
/**
* Given a value this will guess the best column type