Skip to content

Commit

Permalink
Added a column for DataFrame row names in the inspector table. Fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua-Dias-Barreto committed Jul 26, 2023
1 parent 85a9c36 commit e992360
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/DataFrame/DataFrame.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -1426,21 +1426,25 @@ DataFrame >> innerJoin: aDataFrame onLeft: leftColumn onRight: rightColumn [

{ #category : #newtools }
DataFrame >> inspectionItems: aBuilder [
<inspectorPresentationOrder: 0 title: 'DataFrame'>

<inspectorPresentationOrder: 0 title: 'DataFrame'>
| table |
table := aBuilder newTable.

table addColumn: (SpIndexTableColumn new
title: '#';
sortFunction: #yourself ascending;
beNotExpandable;
yourself).
title: '#';
sortFunction: #yourself ascending;
beNotExpandable;
yourself).

table addColumn: (SpStringTableColumn
title: ''
evaluated: [ :rowWithName | rowWithName at: 1 ]).

(self columnNames) doWithIndex: [ :headerName :columnIndex |
self columnNames doWithIndex: [ :headerName :columnIndex |
table addColumn: (SpStringTableColumn
title: headerName
evaluated: [ :rowWithName | rowWithName at: columnIndex + 1 ]) ].
title: headerName
evaluated: [ :rowWithName | rowWithName at: columnIndex + 1 ]) ].

table items: self asArrayOfRowsWithName.

Expand Down

0 comments on commit e992360

Please sign in to comment.