nodes: 0, module; 1, function_definition; 2, function_name:sort_index; 3, parameters; 4, block; 5, identifier:self; 6, expression_statement; 7, expression_statement; 8, comment:# sort index; 9, expression_statement; 10, comment:# each column; 11, for_statement; 12, comment:"""
          Sort the DataFrame by the index. The sort modifies the DataFrame inplace
  
          :return: nothing
          """; 13, assignment; 14, assignment; 15, identifier:c; 16, call; 17, block; 18, identifier:sort; 19, call; 20, attribute; 21, conditional_expression:blist([self._index[x] for x in sort]) if self._blist else [self._index[x] for x in sort]; 22, identifier:range; 23, argument_list; 24, expression_statement; 25, identifier:sorted_list_indexes; 26, argument_list; 27, identifier:self; 28, identifier:_index; 29, call; 30, attribute; 31, list_comprehension; 32, call; 33, assignment; 34, attribute; 35, identifier:blist; 36, argument_list; 37, identifier:self; 38, identifier:_blist; 39, subscript; 40, for_in_clause; 41, identifier:len; 42, argument_list; 43, subscript; 44, conditional_expression:blist([self._data[c][i] for i in sort]) if self._blist else [self._data[c][i] for i in sort]; 45, identifier:self; 46, identifier:_index; 47, list_comprehension; 48, attribute; 49, identifier:x; 50, identifier:x; 51, identifier:sort; 52, attribute; 53, attribute; 54, identifier:c; 55, call; 56, attribute; 57, list_comprehension; 58, subscript; 59, for_in_clause; 60, identifier:self; 61, identifier:_index; 62, identifier:self; 63, identifier:_data; 64, identifier:self; 65, identifier:_data; 66, identifier:blist; 67, argument_list; 68, identifier:self; 69, identifier:_blist; 70, subscript; 71, for_in_clause; 72, attribute; 73, identifier:x; 74, identifier:x; 75, identifier:sort; 76, list_comprehension; 77, subscript; 78, identifier:i; 79, identifier:i; 80, identifier:sort; 81, identifier:self; 82, identifier:_index; 83, subscript; 84, for_in_clause; 85, attribute; 86, identifier:c; 87, subscript; 88, identifier:i; 89, identifier:i; 90, identifier:sort; 91, identifier:self; 92, identifier:_data; 93, attribute; 94, identifier:c; 95, identifier:self; 96, identifier:_data
code: def sort_index(self):
          """
          Sort the DataFrame by the index. The sort modifies the DataFrame inplace
  
          :return: nothing
          """
          sort = sorted_list_indexes(self._index)
          # sort index
          self._index = blist([self._index[x] for x in sort]) if self._blist else [self._index[x] for x in sort]
          # each column
          for c in range(len(self._data)):
              self._data[c] = blist([self._data[c][i] for i in sort]) if self._blist else [self._data[c][i] for i in sort]