Wrap DSL functions into Python functions
lambdamusic opened this issue · comments
Michele Pasin commented
EG
results_df = extract_affiliations(name=df['name'], output='dataframe')
basically making python functions for each of the API 'functions' that take the same arguments at the API functions and just passing through the request. then adding a few keyword arguments to the python function for specifying things like output formatting, etc
johnichiban commented
Some thoughts...
- Output options would ideally include something like 'raw' and 'dataframe'.
- For functions that can return more than one result, include option to return only the single 'best' result.
- If returning a 'dataframe' for a function that returns multiple results, return multiple rows per input with a key of some sort back to the original input. (maybe a numerical key corresponding to row number of input)
- All functions can take batch input. if the corresponding API functions support batch operations, chunk the input and process in batches. otherwise just process through the inputs one at a time and return all results as a list of raw results or dataframe of all results.
Michele Pasin commented
Soon to be released with v 0.8