File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2458,7 +2458,9 @@ DataFrame >> toString [
24582458
24592459 columnWidths := dataFrame columnNames collect: [ :columnName |
24602460 | maxWidth |
2461- maxWidth := columnName size.
2461+ columnName isString
2462+ ifFalse: [ maxWidth := columnName asString size ]
2463+ ifTrue: [ maxWidth := columnName size ].
24622464 dataFrame rows do: [ :row |
24632465 | value |
24642466 value := row at: columnName.
@@ -2467,8 +2469,11 @@ DataFrame >> toString [
24672469
24682470 dataFrame columnNames withIndexDo: [ :columnName :index |
24692471 | paddedColumnName |
2470- paddedColumnName := columnName padRightTo: (columnWidths at: index).
2471- stringTable nextPutAll: paddedColumnName, ' ' ].
2472+ paddedColumnName := (columnName isString
2473+ ifFalse: [ columnName asString ]
2474+ ifTrue: [ columnName ]) padRightTo:
2475+ (columnWidths at: index).
2476+ stringTable nextPutAll: paddedColumnName , ' ' ].
24722477 stringTable cr.
24732478
24742479
You can’t perform that action at this time.
0 commit comments