@Substitution(name='<STR_LIT>')<EOL><INDENT>@Appender(_common_see_also)<EOL>def rank(self, method='<STR_LIT>', ascending=True, na_option='<STR_LIT>',<EOL>pct=False, axis=<NUM_LIT:0>):<DEDENT>
if na_option not in {'<STR_LIT>', '<STR_LIT>', '<STR_LIT>'}:<EOL><INDENT>msg = "<STR_LIT>"<EOL>raise ValueError(msg)<EOL><DEDENT>return self._cython_transform('<STR_LIT>', numeric_only=False,<EOL>ties_method=method, ascending=ascending,<EOL>na_option=na_option, pct=pct, axis=axis)<EOL>
Provide the rank of values within each group.

Parameters
----------
method : {'average', 'min', 'max', 'first', 'dense'}, default 'average'
    * average: average rank of group
    * min: lowest rank in group
    * max: highest rank in group
    * first: ranks assigned in order they appear in the array
    * dense: like 'min', but rank always increases by 1 between groups
ascending : boolean, default True
    False for ranks by high (1) to low (N)
na_option :  {'keep', 'top', 'bottom'}, default 'keep'
    * keep: leave NA values where they are
    * top: smallest rank if ascending
    * bottom: smallest rank if descending
pct : boolean, default False
    Compute percentage rank of data within each group
axis : int, default 0
    The axis of the object over which to compute the rank.

Returns
-------
DataFrame with ranking of values within each group