This message was deleted.
# hamilton-help
s
This message was deleted.
👀 1
s
ah yes
you just need to provide a mapping from
clinical_trials_path
to
csv_path
e.g.
Copy code
@does(_load_csv, csv_path='clinical_trials_path', mapping_dict='clinical_trials_mapping')
def df_clinical_trials(clinical_trials_path: str, clinical_trials_mapping: dict) -> pyspark.pandas.frame.DataFrame:
   pass
a
Ah right okay that’s why
I see now
👍 1
This was very helpful! Thank you
👌 1
s
@Anwar Brini though — just to ask the question, it might be simpler to just do:
Copy code
def df_clinical_trials(clinical_trials_path: str, clinical_trials_mapping: dict) -> pyspark.pandas.frame.DataFrame:
   return _load_csv(clinical_trials_path, clinical_trials_mapping)
?
a
yeah but i’m using the same function with multiple inputs that’s why
Actually yeah
haha
But this will make the function _load_csv (present in the module file) to run aswell
s
it doesn’t have to be in the same module.
but if it is, then a
_
prefix is required
a
i see okay i will test it then
that would make things less cumbersome
s
e.g. this should work fine if
load_csv
was in utils.py
Copy code
from utils import load_csv

def df_clinical_trials(clinical_trials_path: str, clinical_trials_mapping: dict) -> pyspark.pandas.frame.DataFrame:
   return load_csv(clinical_trials_path, clinical_trials_mapping)
👍 1