Object Reference : Object View and Procedure Reference : Table
  
 
sort
Sort the selected rows of a table object.
Syntax
table_name.sort(cell_range) column_arg
where column_arg is a list of columns by which to sort the cell_range. You may specify up to three columns for sorting. The specified columns must be within the cell_range. If you list two or more columns, sort uses the values of the second column to resolve ties in the first column, and values of the third column to resolve ties in the first and second. By default, EViews will sort in ascending order. To sort in descending order, precede the column name with a minus sign (“-”).
The cell_range defines the cells to be modified. See Table::setformat for the syntax for cell_range specifications.
Examples
tab1.sort(a1:c20) b
sorts the cells from the 1st column 1st row to the 3rd column 20th row by column b in ascending order.
tab1.sort(b10:z250) –f h q
sorts the cells from the 2nd column 10th row to the 26th column 250th row by column f in descending order, then in ascending order by column h and once again in ascending order by column q.
Cross-references
See Table::setformat for the syntax for cell_range specifications.