Benoit Aubuchon
03/03/2025, 6:07 PMThierry Jean
03/03/2025, 6:28 PMfrom hamilton.driver import Builder
dr = Builder().with_modules(...).build()
# returns a dictionary with keys `series_a` and `series_b`
results = dr.execute(["series_a", "series_b"])
and results is a dictionary of pd.Series
## Solution
By default, Driver.execute() returns a dict. Using a ResultBuilder, you can automatically merge the series to return a DataFrame.
from hamilton.driver import Builder
from hamilton.base import PandasDataFrameResult
dr = (
Builder()
.with_modules(...)
.with_adapters(PandasDataFrameResult())
.build()
)
# returns a dataframe with two columns
results = dr.execute(["series_a", "series_b"])Benoit Aubuchon
03/04/2025, 3:43 PM.with_adapters(base.PandasDataFrameResult()) that created the problem for me, removing the line fix the behavior. Sorry about that