featuretools icon indicating copy to clipboard operation
featuretools copied to clipboard

Fix: support datetime + pandas.Timedelta addition in AddNumericScalar

Open Hasan-8326 opened this issue 2 months ago • 1 comments

This pull request fixes an issue where adding a pandas.Timedelta to a datetime feature (e.g., f + pd.Timedelta(1, 'y')) raised an AssertionError in Featuretools. The root cause was that the AddNumericScalar primitive only supported numeric addition and did not handle datetime + timedelta operations. This update enhances AddNumericScalar to support both numeric and datetime inputs, allowing datetime features to be correctly offset by pandas.Timedelta values. The change maintains backward compatibility with numeric features and ensures that time-based arithmetic works as expected in feature definitions.

Hasan-8326 avatar Oct 30 '25 06:10 Hasan-8326

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Oct 30 '25 06:10 CLAassistant