class_docstr: Builds DP queries on (Spark, Pandas, Beam) DataFrames.
  
  It uses a Builder pattern, each public function except of build_query
  returns the reference to itself.
  The usage is
  QueryBuilder().groupby(...).aggregation1(...)....aggregation_n().build_query()
  
  Example:
      # The following query computes restaurant visits and total money
      # spent:
      query = QueryBuilder(df, "user_id")
      .groupby("day", max_groups_contributed=3, max_contributions_per_group=1)
      .count()
      .sum("spent_money", min_value=0, max_value=100)
      .mean("spent_money") # no need to specify min_value, max_value, they
      # were already given in sum
      .build_query()
class_docstr_tok: ["Builds","DP","queries","on","(","Spark",",","Pandas",",","Beam",")","DataFrames",".","It","uses","a","Builder","pattern",",","each","public","function","except","of","build_query","returns","the","reference","to","itself",".","The","usage","is","QueryBuilder","(",")",".groupby","(","...",")",".aggregation1","(","...",")","....","aggregation_n","(",")",".build_query","(",")","Example",":","#","The","following","query","computes","restaurant","visits","and","total","money","#","spent",":","query","=","QueryBuilder","(","df",",","``","user_id","''",")",".groupby","(","``","day","''",",","max_groups_contributed=3",",","max_contributions_per_group=1",")",".count","(",")",".sum","(","``","spent_money","''",",","min_value=0",",","max_value=100",")",".mean","(","``","spent_money","''",")","#","no","need","to","specify","min_value",",","max_value",",","they","#","were","already","given","in","sum",".build_query","(",")"]
docstr: Adds mean aggregation to the query.
  
  Args:
      column: column to compute mean
      min_value, max_value: capping limits to each value.
      name: the name of the output column.
docstr_tok: ["Adds","mean","aggregation","to","the","query",".","Args",":","column",":","column","to","compute","mean","min_value",",","max_value",":","capping","limits","to","each","value",".","name",":","the","name","of","the","output","column","."]
code: def mean(
      self,
      column: str,
      *,
      min_value: Optional[float] = None,
      max_value: Optional[float] = None,
      name: str = None,
  ) -> "QueryBuilder":
      """Adds mean aggregation to the query.
  
      Args:
          column: column to compute mean
          min_value, max_value: capping limits to each value.
          name: the name of the output column.
      """
  
      return self._add_aggregation(
          _AggregationSpec(
              metric=pipeline_dp.Metrics.MEAN,
              input_column=column,
              output_column=name,
              min_value=min_value,
              max_value=max_value,
          )
      )
  
imports: import abc
  import copy
  from collections import namedtuple
  from dataclasses import dataclass
  from typing import Any, Dict, Iterable, List, Optional, Sequence, Tuple, Union
  import pipeline_dp
  import pyspark
label_desc: Use image node_id 5 for calling the QueryBuilder obj's underlying member method code with example usage: obj.mean(column) and returns: self