modin/pandas/series.py
def groupby(
        self,
        by=None,
        axis=0,
        level=None,
        as_index=True,
        sort=True,
        group_keys=True,
        squeeze: bool = no_default,
        observed=False,
        dropna: bool = True,
    ):  # noqa: PR01, RT01, D200
        """
        Group Series using a mapper or by a Series of columns.
        """
        if squeeze is not no_default:
            warnings.warn(
                (
                    "The `squeeze` parameter is deprecated and "
                    "will be removed in a future version."
                ),
                FutureWarning,
                stacklevel=2,
            )
        else:
            squeeze = False

        from .groupby import SeriesGroupBy

        if not as_index:
            raise TypeError("as_index=False only valid with DataFrame")
        # SeriesGroupBy expects a query compiler object if it is available
        if isinstance(by, Series):
            by = by._query_compiler
        elif callable(by):
            by = by(self.index)
        elif by is None and level is None:
            raise TypeError("You have to supply one of 'by' and 'level'")
        return SeriesGroupBy(
            self,
            by,
            axis,
            level,
            as_index,
            sort,
            group_keys,
            squeeze,
            idx_name=None,
            observed=observed,
            drop=False,
            dropna=dropna,
        )

        Group Series using a mapper or by a Series of columns.
        
Group Series using a mapper or by a Series of columns.
Group Series using a mapper or by a Series of columns .
def groupby(
        self,
        by=None,
        axis=0,
        level=None,
        as_index=True,
        sort=True,
        group_keys=True,
        squeeze: bool = no_default,
        observed=False,
        dropna: bool = True,
    ):  
        if squeeze is not no_default:
            warnings.warn(
                (
                    "The `squeeze` parameter is deprecated and "
                    "will be removed in a future version."
                ),
                FutureWarning,
                stacklevel=2,
            )
        else:
            squeeze = False
        from .groupby import SeriesGroupBy
        if not as_index:
            raise TypeError("as_index=False only valid with DataFrame")
        if isinstance(by, Series):
            by = by._query_compiler
        elif callable(by):
            by = by(self.index)
        elif by is None and level is None:
            raise TypeError("You have to supply one of 'by' and 'level'")
        return SeriesGroupBy(
            self,
            by,
            axis,
            level,
            as_index,
            sort,
            group_keys,
            squeeze,
            idx_name=None,
            observed=observed,
            drop=False,
            dropna=dropna,
        )
def groupby ( self , by = None , axis = 0 , level = None , as_index = True , sort = True , group_keys = True , squeeze : bool = no_default , observed = False , dropna : bool = True , ) : if squeeze is not no_default : warnings . warn ( ( "The `squeeze` parameter is deprecated and " "will be removed in a future version." ) , FutureWarning , stacklevel = 2 , ) else : squeeze = False from . groupby import SeriesGroupBy if not as_index : raise TypeError ( "as_index=False only valid with DataFrame" ) if isinstance ( by , Series ) : by = by . _query_compiler elif callable ( by ) : by = by ( self . index ) elif by is None and level is None : raise TypeError ( "You have to supply one of 'by' and 'level'" ) return SeriesGroupBy ( self , by , axis , level , as_index , sort , group_keys , squeeze , idx_name = None , observed = observed , drop = False , dropna = dropna , )
Group Series using a mapper or by a Series of columns.
Group Series using a mapper or by a Series of columns .
# noqa: PR01, RT01, D200 """
        Group Series using a mapper or by a Series of columns.
        """ # SeriesGroupBy expects a query compiler object if it is available
self
by
axis
level
as_index
sort
group_keys
squeeze
bool
observed
dropna
bool