function typeFind(arr) {
const firstRow = arr[0];
const cols = arr.columns;
const df = [];
for (let col of cols) {
let value;
for (let i = 0; i < arr.length; i++) {
value = arr[i][col];
let missing = (value === null || typeof value === "undefined" || value === "NA")
if (!missing) {
break;
}
}
const hasProtoType = value instanceof Object;
if (hasProtoType) {
df.push({column: col, type: value.constructor.name});
} else {
df.push({column: col, type: typeof value});
}
}
return df;
}