Shoaib
03/26/2025, 3:26 PMStefan Krawczyk
03/26/2025, 6:10 PMIt seems I will require to use one function per rule and pass in Series as opposed to dataframes.So with Hamilton you can choose at what level of granularity you want to think at - so you can mix and match series or dataframes.
Is it okay to just pass the whole dataframe to the function which then appends a column with its transformation and the next function does the same etc.One caveat is that you generally don't want to mutate the input because that can lead to bugs.
But then I will have to reassemble the dataframe at the end somehow...There are many ways to do this. You can make a function to take in the columns and output a dataframe your self. If it's the last thing you can implement your own custom result builder or the standard pandas one.
Stefan Krawczyk
03/26/2025, 6:11 PMShoaib
03/26/2025, 6:27 PMStefan Krawczyk
03/27/2025, 4:32 AMBenoit Aubuchon
03/28/2025, 1:29 PMShoaib
04/18/2025, 7:46 PMStefan Krawczyk
04/18/2025, 9:15 PMStefan Krawczyk
04/20/2025, 4:46 AMclass NodeExecutionCapturer(...):
# class based on printLN one
ncc = NodeExecutionCapturer(...) # instantiate your adapter
dr = driver.Builder(). ...
.with_adapters(ncc)
.build()
result = dr.execute(...)
ncc.print_execution_order(...) # inspect state of your object