def sort(self,nCol,order):  
        
        self.layoutAboutToBeChanged.emit()
        if order == Qt.AscendingOrder:
            self.df = self.df.sort(column=self.df.columns[nCol], ascending=True)
        elif order == Qt.DescendingOrder:
            self.df = self.df.sort(column=self.df.columns[nCol], ascending=False)          
          
        self.layoutChanged.emit()
dataset/ETHPy150Open cmorgan/trading-with-python/lib/qtpandas.py/DataFrameModel.sort/original