docstr: Aggregate over `var` column of `data` with estimate and error interval.
docstr_tok: ["Aggregate","over","`","var","`","column","of","`","data","`","with","estimate","and","error","interval","."]
code: def __call__(self, data, var):
      """Aggregate over `var` column of `data` with estimate and error interval."""
      vals = data[var]
      weights = data["weight"]
  
      estimate = np.average(vals, weights=weights)
  
      if self.error_method == "ci" and len(data) > 1:
  
          def error_func(x, w):
              return np.average(x, weights=w)
  
          boots = bootstrap(
              vals, weights, func=error_func, **self.boot_kws
          )
          err_min, err_max = _percentile_interval(
              boots, self.error_level
          )
  
      else:
          err_min = err_max = np.nan
  
      return pd.Series(
          {var: estimate, f"{var}min": err_min, f"{var}max": err_max}
      )
  
imports: from numbers import Number
  from statistics import NormalDist
  import numpy
  import pandas
  from .algorithms import bootstrap
  from .utils import _check_argument
label_desc: Use image node_id 2 for calling the WeightedAggregator obj's underlying member method code with example usage: obj.__call__(data, var) and returns: pd, np