“我如何打印每次迭代所花费的时间?”
def generate_master_df(o_df, s_df, o_days, s_days, metrics, extreme_thresh, o_thresh, t_start=first_o_date, t_end=now): for od, sd, m, et, ot in itertools.product(o_days, s_days, metrics, extreme_thresh, o_thresh): t_start, t_end = adjusted_start_end(od, sd, t_start, t_end) all_t = [t_start + dt.timedelta(d) for d in range(0, (t_end - t_start).days)] partial_main_pipeline = partial_function(main_pipeline, o_df, s_df, od, sd, m, et, ot) df = concat_dfs(sync_iteration(partial_main_pipeline, all_t)) get_sentiment_corr(df, od, sd, m, et, ot)