nodes: 0, module; 1, function_definition; 2, function_name:sort; 3, parameters; 4, block; 5, identifier:self; 6, typed_parameter; 7, expression_statement; 8, try_statement; 9, identifier:col; 10, type; 11, comment:"""
          Sorts the main dataframe according to the given column
  
          :param col: column name
          :type col: str
  
          :example: ``ds.sort("Col 1")``
          """; 12, block; 13, except_clause; 14, identifier:str; 15, expression_statement; 16, as_pattern; 17, block; 18, assignment; 19, identifier:Exception; 20, as_pattern_target; 21, expression_statement; 22, attribute; 23, call; 24, identifier:e; 25, call; 26, identifier:self; 27, identifier:df; 28, attribute; 29, argument_list; 30, attribute; 31, argument_list; 32, call; 33, identifier:sort_values; 34, identifier:col; 35, identifier:self; 36, identifier:err; 37, identifier:e; 38, binary_operator:"Can not sort the dataframe from column " +
                       str(col); 39, attribute; 40, argument_list; 41, string:"Can not sort the dataframe from column "; 42, call; 43, attribute; 44, identifier:copy; 45, identifier:str; 46, argument_list; 47, identifier:self; 48, identifier:df; 49, identifier:col
code: def sort(self, col: str):
          """
          Sorts the main dataframe according to the given column
  
          :param col: column name
          :type col: str
  
          :example: ``ds.sort("Col 1")``
          """
          try:
              self.df = self.df.copy().sort_values(col)
          except Exception as e:
              self.err(e, "Can not sort the dataframe from column " +
                       str(col))