mattia.paterna
06/13/2024, 2:06 PMpreprocessing_a = pipeline(pipe=preprocess, inputs={"params:function": "func_a"})
preprocessing_b = pipeline(pipe=preprocess, inputs={"params:function": "func_b"})
datajoely
06/13/2024, 2:07 PMimportlib.import_module
and essentially call the function within your functiondatajoely
06/13/2024, 2:09 PMdef some_func(df, target:str, path):
writer = getattr(df,f'to_{target}')
writer(path)
some_func(df, "csv", "/path/to/csv")
some_func(df, "parquet", "/path/to/pq"