File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/Microsoft.Data.Analysis Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -671,18 +671,20 @@ public override string ToString()
671671 {
672672 longestColumnName = Math . Max ( longestColumnName , Columns [ i ] . Name . Length ) ;
673673 }
674+
675+ int padding = Math . Max ( 10 , longestColumnName + 1 ) ;
674676 for ( int i = 0 ; i < Columns . Count ; i ++ )
675677 {
676- // Left align by 10
677- sb . Append ( string . Format ( Columns [ i ] . Name . PadRight ( longestColumnName ) ) ) ;
678+ // Left align by 10 or more (in case of longer column names)
679+ sb . Append ( string . Format ( Columns [ i ] . Name . PadRight ( padding ) ) ) ;
678680 }
679681 sb . AppendLine ( ) ;
680682 long numberOfRows = Math . Min ( Rows . Count , 25 ) ;
681683 for ( int i = 0 ; i < numberOfRows ; i ++ )
682684 {
683685 foreach ( object obj in Rows [ i ] )
684686 {
685- sb . Append ( ( obj ?? "null" ) . ToString ( ) . PadRight ( longestColumnName ) ) ;
687+ sb . Append ( ( obj ?? "null" ) . ToString ( ) . PadRight ( padding ) ) ;
686688 }
687689 sb . AppendLine ( ) ;
688690 }
You can’t perform that action at this time.
0 commit comments