feature_engine
feature_engine copied to clipboard
New transformer to substract datetime variables, that is support timestamp subtraction
Is there any chance that you would support the ability to subtract datetime columns?
We do want to expand the functionality of Feature-engine to work with datetime variables. See for example #67. I think that would be the first step. And then we can see how to best implement datetime combinations.
I am inclined to have separate transformers to handle datetime variables. Otherwise, the transformers become too complicated.
We are a bit short of hands. So if you fancy helping us expand the library, that would be great.
I think it does make sense to have datetime transformers in its own module. I'll give #67 a look. Thanks!
I see that the datetime module was released today. If we wanted to proceed with a datetime subtraction class, would we just need to combine some parts of the DatetimeFeatures class w/ most of what's in the CombineWithReferenceFeature class? One additional argument would need to be output_units perhaps? Or just hardcode it to be fractions of a day?
What you say sounds right. I would have an output units argument as well. some differences might be in seconds, so fractions of the day might not be very useful.
Would you like to give it a go?
I might give it a go if I have some time this week/weekend.
should I create a datetime_subtraction.py script in the datetime folder?