RandomFractals / vscode-data-preview

Data Preview 🈸 extension for importing 📤 viewing 🔎 slicing 🔪 dicing 🎲 charting 📊 & exporting 📥 large JSON array/config, YAML, Apache Arrow, Avro, Parquet & Excel data files
https://marketplace.visualstudio.com/items?itemName=RandomFractalsInc.vscode-data-preview
Apache License 2.0
550 stars 59 forks source link

Numeric column data type (int/float) is determined by the first row value and rounded accordingly #321

Open nisan-tagar opened 1 year ago

nisan-tagar commented 1 year ago

When opening JSON or XLSX files with data preview, the tool determines the data type of the numeric column based on the first row entry and does not look at all the data set for the correct data type required. Example, for this data set:

[
  {
    "Amt": 2500.00,
  },
  {
    "Amt": 50.25,
  }
]

Data preview will assume that the "Amt" column is of type int and truncate all the data set shown in the grid table. However if the rows are reversed then the data type is set correctly to float and the grid table values are correct as well:

[
  {
    "Amt": 50.25,
  },
  {
    "Amt": 2500.00,
  }
]