class_docstr: A class that represents the group by operation on an H2OFrame.
  
  The returned groups are sorted by the natural group-by column sort.
  
  :param H2OFrame fr: H2OFrame that you want the group by operation to be performed on.
  :param by: by can be a column name (str) or an index (int) of a single column,  or a list for multiple columns
      denoting the set of columns to group by.
  
  Sample usage:
  
  >>> my_frame = h2o.import_file("http://h2o-public-test-data.s3.amazonaws.com/smalldata/iris/iris_wheader.csv")
  >>> grouped = my_frame.group_by(by=["sepal_len",
  ...                                 "sepal_wid"])
  >>> grouped.sum(col="sepal_len",
  ...             na="all").mean(col="class", na="all").max()
  >>> grouped.get_frame()
  
  Any number of aggregations may be chained together in this manner.  Note that once the aggregation operations
  are complete, calling the GroupBy object with a new set of aggregations will yield no effect.  You must generate
  a new GroupBy object in order to apply a new aggregation on it.  In addition, certain aggregations are only
  defined for numerical or categorical columns.  An error will be thrown for calling aggregation on the wrong
  data types.
  
  If no arguments are given to the aggregation (e.g. "max" in the above example), then it is assumed that the
  aggregation should apply to all columns but the group by columns.  However, operations will not be performed
  on String columns.  They will be skipped.
  
  All GroupBy aggregations take parameter na, which controls treatment of NA values during the calculation.
  It can be one of:
  
      - "all" (default) -- any NAs are used in the calculation as-is; which usually results in the final result
        being NA too.
      - "ignore" -- NA entries are not included in calculations, but the total number of entries is taken as the
        total number of rows. For example, ``mean([1, 2, 3, nan], na="ignore")`` will produce ``1.5``.  In addition,
        ``median([1, 2, 3, nan], na="ignore")`` will first sort the row as ``[nan, 1, 2, 3]``.  Next, the median is the
        mean of the two middle values in this case producing a median of ``1.5``.
      - "rm" entries are skipped during the calculations, reducing the total effective count of entries. For
        example, ``mean([1, 2, 3, nan], na="rm")`` will produce ``2``.  The median in this case will be ``2`` as the middle
        value.
  
  Variance (var) and standard deviation (sd) are the sample (not population) statistics.
docstr: Return a new ``GroupBy`` object using the H2OFrame specified in fr and the desired grouping columns
  specified in by.  The original H2O frame will be stored as member _fr.  Information on the new grouping
  of the original frame is described in a new H2OFrame in member frame.
  
  The returned groups are sorted by the natural group-by column sort.
  
  :param H2OFrame fr: H2OFrame that you want the group by operation to be performed on.
  :param by: can be a column name (str) or an index (int) of a single column,  or a list for multiple columns
      denoting the set of columns to group by.
docstr_tok: ["Return","a","new","``","GroupBy","``","object","using","the","H2OFrame","specified","in","fr","and","the","desired","grouping","columns","specified","in","by",".","The","original","H2O","frame","will","be","stored","as","member","_fr",".","Information","on","the","new","grouping","of","the","original","frame","is","described","in","a","new","H2OFrame","in","member","frame",".","The","returned","groups","are","sorted","by","the","natural","group-by","column","sort",".",":","param","H2OFrame","fr",":","H2OFrame","that","you","want","the","group","by","operation","to","be","performed","on",".",":","param","by",":","can","be","a","column","name","(","str",")","or","an","index","(","int",")","of","a","single","column",",","or","a","list","for","multiple","columns","denoting","the","set","of","columns","to","group","by","."]
code: def __init__(self, fr, by):
      """
      Return a new ``GroupBy`` object using the H2OFrame specified in fr and the desired grouping columns
      specified in by.  The original H2O frame will be stored as member _fr.  Information on the new grouping
      of the original frame is described in a new H2OFrame in member frame.
  
      The returned groups are sorted by the natural group-by column sort.
  
      :param H2OFrame fr: H2OFrame that you want the group by operation to be performed on.
      :param by: can be a column name (str) or an index (int) of a single column,  or a list for multiple columns
          denoting the set of columns to group by.
      """
      self._fr = fr  # IN
      self._by = by  # IN
      self._aggs = {}  # IN
      self._res = None  # OUT
  
      if is_type(by, str):
          self._by = [self._fr.names.index(by)]
      elif is_type(by, list, tuple):
          self._by = [
              self._fr.names.index(b) if is_type(b, str) else b
              for b in by
          ]
      else:
          self._by = [self._by]
  
imports: from h2o.utils.compatibility import *
  import warnings
  import h2o
  from h2o.display import format_user_tips, repr_def
  from h2o.expr import ExprNode
  from h2o.utils.typechecks import is_type
label_desc: Use image node_id 1 to create a new GroupBy object from inherited base classes: object with example: obj = GroupBy(fr, by)