class_docstr: Base class of all stats
docstr: Calculate the statistics for all the groups
  
  Return the results in a single dataframe.
  
  This is a default function that can be overriden
  by individual stats
  
  Parameters
  ----------
  data :
      data for the computing
  scales :
      x (``scales.x``) and y (``scales.y``) scale objects.
      The most likely reason to use scale information is
      to find out the physical size of a scale. e.g.
  
      ```python
      range_x = scales.x.dimension()
      ```
  params :
      The parameters for the stat. It includes default
      values if user did not set a particular parameter.
docstr_tok: ["Calculate","the","statistics","for","all","the","groups","Return","the","results","in","a","single","dataframe",".","This","is","a","default","function","that","can","be","overriden","by","individual","stats","Parameters","--","--","--","--","--","data",":","data","for","the","computing","scales",":","x","(","``","scales.x","``",")","and","y","(","``","scales.y","``",")","scale","objects",".","The","most","likely","reason","to","use","scale","information","is","to","find","out","the","physical","size","of","a","scale",".","e.g",".","``","`","python","range_x","=","scales.x.dimension","(",")","``","`","params",":","The","parameters","for","the","stat",".","It","includes","default","values","if","user","did","not","set","a","particular","parameter","."]
code: def compute_panel(
      cls, data: pd.DataFrame, scales: pos_scales, **params: Any
  ):
      """
      Calculate the statistics for all the groups
  
      Return the results in a single dataframe.
  
      This is a default function that can be overriden
      by individual stats
  
      Parameters
      ----------
      data :
          data for the computing
      scales :
          x (``scales.x``) and y (``scales.y``) scale objects.
          The most likely reason to use scale information is
          to find out the physical size of a scale. e.g.
  
          ```python
          range_x = scales.x.dimension()
          ```
      params :
          The parameters for the stat. It includes default
          values if user did not set a particular parameter.
      """
      if not len(data):
          return type(data)()
  
      stats = []
      for _, old in data.groupby("group"):
          new = cls.compute_group(old, scales, **params)
          unique = uniquecols(old)
          missing = unique.columns.difference(new.columns)
          idx = [0] * len(new)
          u = unique.loc[idx, missing].reset_index(  # pyright: ignore
              drop=True
          )
          # concat can have problems with empty dataframes that
          # have an index
          if u.empty and len(u):
              u = type(data)()
  
          group_result = pd.concat([new, u], axis=1)
          stats.append(group_result)
  
      stats = pd.concat(stats, axis=0, ignore_index=True)
      # Note: If the data coming in has columns with non-unique
      # values with-in group(s), this implementation loses the
      # columns. Individual stats may want to do some preparation
      # before then fall back on this implementation or override
      # it completely.
      return stats
  
imports: from __future__ import annotations
  import typing
  from copy import deepcopy
  import pandas
  from .._utils import check_required_aesthetics, copy_keys, data_mapping_as_kwargs, groupby_apply, remove_missing, uniquecols
  from .._utils.registry import Register, Registry
  from ..exceptions import PlotnineError
  from ..layer import layer
  from ..mapping import aes
  from abc import ABC
label_desc: Use image node_id 10 for calling the stat obj's underlying member method code with example usage: obj.compute_panel(cls, data, scales) and returns: stats, type