#NEWLINE# def sort( self , column , ascending ) : #NEWLINE# #INDENT# c = self . columns [ column ] #NEWLINE# comp = self . _data . get_component ( c ) #NEWLINE# if comp . categorical : #NEWLINE# #INDENT# self . order = np . argsort ( comp . labels ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . order = np . argsort ( comp . data ) #NEWLINE# #UNINDENT# if ( ascending == Qt . DescendingOrder ) : #NEWLINE# #INDENT# self . order = self . order [ : : ( - 1 ) ] #NEWLINE# #UNINDENT# self . layoutChanged . emit ( )