Skip to content

Commit 64597e1

Browse files
committed
Reduce default displayed column size in toString
1 parent 8fc1ca5 commit 64597e1

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/danfojs-base/core/frame.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ export default class DataFrame extends NDframe implements DataFrameInterface {
415415
if (colLen > maxColToDisplayInConsole) {
416416
//truncate displayed columns to fit in the console
417417
let firstFourcolNames = this.columns.slice(0, 4);
418-
let lastThreecolNames = this.columns.slice(colLen - 4);
418+
let lastThreecolNames = this.columns.slice(colLen - 3);
419419
//join columns with truncate ellipse in the middle
420420
header = ["", ...firstFourcolNames, "...", ...lastThreecolNames];
421421

@@ -432,7 +432,7 @@ export default class DataFrame extends NDframe implements DataFrameInterface {
432432

433433
let dfSubset2 = this.iloc({
434434
rows: [`0:${maxRow}`],
435-
columns: [`${colLen - 4}:`]
435+
columns: [`${colLen - 3}:`]
436436
});
437437

438438
subIdx = this.index.slice(0, maxRow);
@@ -441,7 +441,7 @@ export default class DataFrame extends NDframe implements DataFrameInterface {
441441

442442
} else {
443443
let dfSubset1 = this.iloc({ columns: ["0:4"] });
444-
let dfSubset2 = this.iloc({ columns: [`${colLen - 4}:`] });
444+
let dfSubset2 = this.iloc({ columns: [`${colLen - 3}:`] });
445445

446446
subIdx = this.index.slice(0, maxRow);
447447
firstHalfValues = dfSubset1.values as ArrayType2D

src/danfojs-base/shared/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default class Configs {
3535
} = {
3636
tableDisplayConfig: {},
3737
tableMaxRow: 10,
38-
tableMaxColInConsole: 21,
38+
tableMaxColInConsole: 10,
3939
dtypeTestLim: 10,
4040
lowMemoryMode: false,
4141
...options

0 commit comments

Comments
 (0)