A JavaScript snippet provided below will load a CSV file named numericalData.csv, which contains headers in the first row and numerical values starting from the second row. The data is then displayed using a Google Visualization Table.
I am looking to convert these numerical values into either float or integer types because currently they are being treated as strings. This causes issues with sorting functionality when displaying the data (refer to the screenshot below).
google.load('visualization', '1', {packages:['table']});
google.setOnLoadCallback(drawTable);
function drawTable() {
var csvData = loadFile("numericalData.csv", ",");
var csvParsedData = CSVToArray(csvData);
var data = google.visualization.arrayToDataTable(csvParsedData);
var table = new google.visualization.Table(document.getElementById('table_div'));
table.draw(data, {allowHtml: true, showRowNumber: true});
}