nodes: 0, module; 1, function_definition; 2, function_name:value_counts; 3, parameters; 4, block; 5, identifier:self; 6, expression_statement; 7, import_from_statement; 8, return_statement; 9, comment:"""
          Return an SFrame containing counts of unique values. The resulting
          SFrame will be sorted in descending frequency.
  
          Returns
          -------
          out : SFrame
              An SFrame containing 2 columns : 'value', and 'count'. The SFrame will
              be sorted in descending order by the column 'count'.
  
          See Also
          --------
          SFrame.summary
  
          Examples
          --------
          >>> sa = turicreate.SArray([1,1,2,2,2,2,3,3,3,3,3,3,3])
          >>> sa.value_counts()
              Columns:
                      value	int
                      count	int
              Rows: 3
              Data:
              +-------+-------+
              | value | count |
              +-------+-------+
              |   3   |   7   |
              |   2   |   4   |
              |   1   |   2   |
              +-------+-------+
              [3 rows x 2 columns]
          """; 10, relative_import; 11, aliased_import; 12, call; 13, import_prefix; 14, dotted_name; 15, dotted_name; 16, identifier:_SFrame; 17, attribute; 18, argument_list; 19, identifier:sframe; 20, identifier:SFrame; 21, call; 22, identifier:sort; 23, string; 24, keyword_argument; 25, attribute; 26, argument_list; 27, string_content:count; 28, identifier:ascending; 29, False; 30, call; 31, identifier:groupby; 32, string; 33, dictionary; 34, identifier:_SFrame; 35, argument_list; 36, string_content:value; 37, pair; 38, dictionary; 39, string; 40, attribute; 41, pair; 42, string_content:count; 43, identifier:_aggregate; 44, identifier:COUNT; 45, string; 46, identifier:self; 47, string_content:value
code: def value_counts(self):
          """
          Return an SFrame containing counts of unique values. The resulting
          SFrame will be sorted in descending frequency.
  
          Returns
          -------
          out : SFrame
              An SFrame containing 2 columns : 'value', and 'count'. The SFrame will
              be sorted in descending order by the column 'count'.
  
          See Also
          --------
          SFrame.summary
  
          Examples
          --------
          >>> sa = turicreate.SArray([1,1,2,2,2,2,3,3,3,3,3,3,3])
          >>> sa.value_counts()
              Columns:
                      value	int
                      count	int
              Rows: 3
              Data:
              +-------+-------+
              | value | count |
              +-------+-------+
              |   3   |   7   |
              |   2   |   4   |
              |   1   |   2   |
              +-------+-------+
              [3 rows x 2 columns]
          """
          from .sframe import SFrame as _SFrame
          return _SFrame({'value':self}).groupby('value', {'count':_aggregate.COUNT}).sort('count', ascending=False)