Skip to content

Commit 9be2946

Browse files
committed
fIX lint warning in test files
2 parents 43780be + 140069d commit 9be2946

6 files changed

Lines changed: 27 additions & 1 deletion

File tree

danfojs/src/core/utils.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,29 @@ export class Utils {
428428
if (return_val) {
429429
result_arr.push(val_count);
430430
} else {
431+
<<<<<<< HEAD
431432
result_arr.push(null_count);
433+
=======
434+
let result_arr = []
435+
arr.map(ele_arr => {
436+
let null_count = 0
437+
let val_count = 0
438+
ele_arr.map(ele => {
439+
if (isNaN(ele) && typeof ele != "string") {
440+
null_count = null_count + 1
441+
} else {
442+
val_count = val_count + 1
443+
}
444+
})
445+
if (val) {
446+
result_arr.push(val_count)
447+
} else {
448+
result_arr.push(null_count)
449+
}
450+
})
451+
return result_arr
452+
453+
>>>>>>> 140069d5ee29a7f877894ddb2b3fd6ab2b375917
432454
}
433455
});
434456
return result_arr;

danfojs/src/io/reader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ export const read = async (
191191
}
192192
}
193193

194-
if (["csv", "xls", "xlsx"].includes(await file.descriptor.format)) {
194+
if ([ "csv", "xls", "xlsx" ].includes(await file.descriptor.format)) {
195195
if (header) {
196196
let df = new DataFrame(rows.slice(1), { columns: rows[0] });
197197
return df;

danfojs/tests/core/frame.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable no-undef */
12
const fs = require("fs");
23

34
const testCSVPath = "./tester.csv";

danfojs/tests/core/generic.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable no-undef */
12
const tf = require("@tensorflow/tfjs-core");
23

34
describe("Generic (NDFrame)", function () {

danfojs/tests/core/series.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable no-undef */
12
const tf = require("@tensorflow/tfjs-core");
23

34
describe("Series", function () {

danfojs/tests/io/reader.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable no-undef */
12
describe("read_csv", async function () {
23
this.timeout(10000); // all tests in this suite get 10 seconds before timeout
34
it("reads a csv file from source over the internet", async function () {

0 commit comments

Comments
 (0)