This message was deleted.
# hamilton-help
s
This message was deleted.
e
What is your driver expecting? Do you have a bunch of functions that take in series, and you have a dataframe you want to pass in?
s
@JVial we have thought about this — and right now:
Copy code
df.to_dict(orient="series")
Is a quick one liner that does the conversion. Our apprehension to do going it automatically is just around what is most obvious as to what is happening if someone was to come read the code after you wrote it.
j
Thanks for the help :) I will test it soon :)
Hi guys, so its not working 😞 I have a function which pass in a dataframe but i get the error -> Error: Required input my_dataframe not provided for nodes: ['business_travel'].
Copy code
my_dataframe = result_df.to_dict(orient="series")
hamilton_driver = driver.Driver(my_dataframe, module)
output = hamilton_driver.execute(output_columns)
and the transformation-script (at the moment really minimalistic)
Copy code
def business_travel(my_dataframe: pd.DataFrame) -> pd.DataFrame:
    <http://logger.info|logger.info>("Start with Transformation")

    return my_dataframe
👀 1
s
@JVial your
business_travel
function expects an input named “my_dataframe” that is of type DataFrame. You’re currently passing in a dict of series that doesn’t map to that expectation. So one way you can do it is like so:
Copy code
hamilton_driver = driver.Driver({}, module)
output = hamilton_driver.execute(output_columns, inputs={"my_dataframe": result_df)