MCPcopy Create free account
hub / github.com/DFin/palaeograph / inferBestNumericColumns

Function inferBestNumericColumns

src/csvLoader.js:84–91  ·  view source on GitHub ↗
(columnStats)

Source from the content-addressed store, hash-verified

82}
83
84export function inferBestNumericColumns(columnStats) {
85 const numericColumns = buildNumericColumnList(columnStats);
86 if (numericColumns.length >= 3) {
87 return numericColumns.slice(0, 3);
88 }
89 const fallback = columnStats.map((column) => column.name);
90 return [...numericColumns, ...fallback.filter((name) => !numericColumns.includes(name))].slice(0, 3);
91}

Callers 1

autoAssignAxesFunction · 0.90

Calls 1

buildNumericColumnListFunction · 0.85

Tested by

no test coverage detected