diff --git a/data/tableDisplay.py b/data/tableDisplay.py index 9d09aa5883ed0eb415c1300b25940399d8c12355..839f681a7d2f024f30eda2083e148d6b94266c9a 100644 --- a/data/tableDisplay.py +++ b/data/tableDisplay.py @@ -115,7 +115,8 @@ def orderRenameTable( df, indexDict ): df.index.names = indexNames df.rename( dict( colDict ), axis='columns', inplace=True ) # Sort the rows (by index column order) - df = df.sort_values( by = sortIndex ) + if ( len(sortIndex) > 0 ): + df = df.sort_values( by = sortIndex ) return df ### FORMATTING