diff --git a/fondant/component.py b/fondant/component.py index 8f679e9e0..b8fffeaf1 100644 --- a/fondant/component.py +++ b/fondant/component.py @@ -273,7 +273,7 @@ def wrapped_transform(self, dataframe: pd.DataFrame) -> pd.DataFrame: ) dataframe = self.transform(dataframe) # Drop columns not in the produces section of the component spec - dataframe.drop( + dataframe = dataframe.drop( columns=[ (subset, field) for (subset, field) in dataframe.columns