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()
671
671
{
672
672
longestColumnName = Math . Max ( longestColumnName , Columns [ i ] . Name . Length ) ;
673
673
}
674
+
675
+ int padding = Math . Max ( 10 , longestColumnName + 1 ) ;
674
676
for ( int i = 0 ; i < Columns . Count ; i ++ )
675
677
{
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 ) ) ) ;
678
680
}
679
681
sb . AppendLine ( ) ;
680
682
long numberOfRows = Math . Min ( Rows . Count , 25 ) ;
681
683
for ( int i = 0 ; i < numberOfRows ; i ++ )
682
684
{
683
685
foreach ( object obj in Rows [ i ] )
684
686
{
685
- sb . Append ( ( obj ?? "null" ) . ToString ( ) . PadRight ( longestColumnName ) ) ;
687
+ sb . Append ( ( obj ?? "null" ) . ToString ( ) . PadRight ( padding ) ) ;
686
688
}
687
689
sb . AppendLine ( ) ;
688
690
}
You can’t perform that action at this time.
0 commit comments