def pre(self, df):
if self.variable not in df:
df.loc[:, self.variable] = df.apply(lambda row: binom_test(np.round(row['s1_area_fraction_top'] * row['s1']),
np.round(row['s1']),
self.aft_map(np.sqrt(row['x']**2 + row['y']**2),
row['z'])[0, 0]),
axis=1)
return df
评论列表
文章目录