def apply_on_factors(func, factors, *args): values = map(lambda x: __delayed(func)(x, *args), factors) return __compute(*values, scheduler="multiprocessing")
def apply_on_dataframes(func, df_list, *args): values = map(lambda x: __delayed(func)(x, *args), df_list) return __compute(*values, scheduler="multiprocessing")
def rolling_apply_on_dataframe_index(func, df, window, step=1, *args): values = map( lambda x: __delayed(func)(x, *args), map(lambda x: df.iloc[x - window:x], range(df.shape[0], window - 1, -step))) return __compute(*values, scheduler="multiprocessing")
def apply_on_dataframe_columns(func, df, *args): values = map(lambda x: __delayed(func)(x, *args), map(lambda x: df[x], df.columns)) return __compute(*values, scheduler="multiprocessing")
def loading_data_by_split_code_list(func, code_list, window=1000): values = map( lambda codes: __delayed(func)(codes), map(lambda x: code_list[x:x + window], range(0, len(code_list), window))) return __pd.concat(__compute(*values, scheduler="threading"))