standard_errors.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:meterstick 作者: google 项目源码 文件源码
def precalculate_factors(self, df):
    """Precomputes the buckets and labels for the Jackknife object.

    Args:
      df: A pandas dataframe.
    """

    if self._unit is None:
      self._buckets = np.arange(len(df))
      self._bucket_labels = np.arange(len(df))
    else:
      self._buckets, names = pd.factorize(df[self._unit])
      self._bucket_labels = np.arange(len(names))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号