@@ -2287,9 +2287,7 @@ DataFrame >> toHtml [
22872287
22882288 columnWidths := dataFrame columnNames collect: [ :columnName |
22892289 | maxWidth |
2290- columnName isString
2291- ifFalse: [ maxWidth := columnName asString size ]
2292- ifTrue: [ maxWidth := columnName size ].
2290+ maxWidth := columnName asString size.
22932291 dataFrame rows do: [ :row |
22942292 | value |
22952293 value := row at: columnName.
@@ -2298,10 +2296,7 @@ DataFrame >> toHtml [
22982296
22992297 dataFrame columnNames withIndexDo: [ :columnName :index |
23002298 | paddedColumnName |
2301- paddedColumnName := (columnName isString
2302- ifFalse: [ columnName asString ]
2303- ifTrue: [ columnName ]) padRightTo:
2304- (columnWidths at: index).
2299+ paddedColumnName := columnName asString padRightTo: (columnWidths at: index).
23052300 html
23062301 nextPutAll: ' <th>' ;
23072302 nextPutAll: paddedColumnName;
@@ -2366,9 +2361,7 @@ DataFrame >> toLatex [
23662361
23672362 columnWidths := dataFrame columnNames collect: [ :columnName |
23682363 | maxWidth |
2369- columnName isString
2370- ifFalse: [ maxWidth := columnName asString size ]
2371- ifTrue: [ maxWidth := columnName size ].
2364+ maxWidth := columnName asString size.
23722365 dataFrame rows do: [ :row |
23732366 | value |
23742367 value := row at: columnName.
@@ -2377,10 +2370,7 @@ DataFrame >> toLatex [
23772370
23782371 dataFrame columnNames withIndexDo: [ :columnName :index |
23792372 | paddedColumnName |
2380- paddedColumnName := (columnName isString
2381- ifFalse: [ columnName asString ]
2382- ifTrue: [ columnName ]) padRightTo:
2383- (columnWidths at: index).
2373+ paddedColumnName := columnName asString padRightTo: (columnWidths at: index).
23842374 index = dataFrame numberOfColumns
23852375 ifFalse: [ markdown nextPutAll: paddedColumnName , ' & ' ]
23862376 ifTrue: [ markdown nextPutAll: paddedColumnName ] ].
@@ -2419,9 +2409,7 @@ DataFrame >> toMarkdown [
24192409
24202410 columnWidths := dataFrame columnNames collect: [ :columnName |
24212411 | maxWidth |
2422- columnName isString
2423- ifFalse: [ maxWidth := columnName asString size ]
2424- ifTrue: [ maxWidth := columnName size ].
2412+ maxWidth := columnName asString size.
24252413 dataFrame rows do: [ :row |
24262414 | value |
24272415 value := row at: columnName.
@@ -2430,10 +2418,7 @@ DataFrame >> toMarkdown [
24302418
24312419 dataFrame columnNames withIndexDo: [ :columnName :index |
24322420 | paddedColumnName |
2433- paddedColumnName := (columnName isString
2434- ifFalse: [ columnName asString ]
2435- ifTrue: [ columnName ]) padRightTo:
2436- (columnWidths at: index).
2421+ paddedColumnName := columnName asString padRightTo: (columnWidths at: index).
24372422 markdown nextPutAll: paddedColumnName , ' | ' ].
24382423 markdown cr.
24392424 markdown nextPutAll: ' | ' .
@@ -2469,9 +2454,7 @@ DataFrame >> toString [
24692454
24702455 columnWidths := dataFrame columnNames collect: [ :columnName |
24712456 | maxWidth |
2472- columnName isString
2473- ifFalse: [ maxWidth := columnName asString size ]
2474- ifTrue: [ maxWidth := columnName size ].
2457+ maxWidth := columnName asString size.
24752458 dataFrame rows do: [ :row |
24762459 | value |
24772460 value := row at: columnName.
@@ -2480,10 +2463,7 @@ DataFrame >> toString [
24802463
24812464 dataFrame columnNames withIndexDo: [ :columnName :index |
24822465 | paddedColumnName |
2483- paddedColumnName := (columnName isString
2484- ifFalse: [ columnName asString ]
2485- ifTrue: [ columnName ]) padRightTo:
2486- (columnWidths at: index).
2466+ paddedColumnName := columnName asString padRightTo: (columnWidths at: index).
24872467 stringTable nextPutAll: paddedColumnName , ' ' ].
24882468 stringTable cr.
24892469
0 commit comments