feature_engine icon indicating copy to clipboard operation
feature_engine copied to clipboard

Datetime subtraction

Open kylegilde opened this issue 3 years ago • 7 comments

Implements the DateTimeSubtraction class.

I don't know if the _more_tags method is needed. I copied and pasted it from CombineWithReferenceFeature.

kylegilde avatar Jan 09 '22 02:01 kylegilde

looks like there is more work to do. I can see if I can keep working through the Code Contributor list of steps.

kylegilde avatar Jan 09 '22 02:01 kylegilde

I think that I fixed all the type bugs, but maybe not in the most efficient manner.

kylegilde avatar Jan 10 '22 03:01 kylegilde

I should be able to find some time this week/weekend to add some tests.

kylegilde avatar Jan 10 '22 15:01 kylegilde

Hi @kylegilde

I can't find your comment, so I paste it here:

**To summarize your proposal, you would like to see:

  • variables_to_combine could accept the None argument and then select all datetime variables.
  • reference_variables requires a list of datetime variables
  • remove "var_a - var_a"
  • allow "var_a - var_b and var_b - var_a" to occur

Is that correct?

Regarding the preventing of "var_a - var_b and var_b - var_a", it is debatable whether many people would like to see this functionality. I'm not sure that it would justify a separate class given that this functionality can be supported with a couple of lines of code.**

I am happy to add the extra code to prevent "var_a - var_b and var_b - var_a"

Thank you!

solegalli avatar Jan 15 '22 14:01 solegalli

Hi @solegalli, I implemented the changes we discussed and started creating the test file. It's my first time using pytest, so I'm experiencing a learning curve.

kylegilde avatar Jan 17 '22 16:01 kylegilde

Hi @solegalli , I haven't heard from you in a little while. If I make all of the requested changes and pass the tests, are you still interested in merging this code? Thanks

kylegilde avatar Feb 06 '22 21:02 kylegilde

Hi @solegalli , I haven't heard from you in a little while. If I make all of the requested changes and pass the tests, are you still interested in merging this code? Thanks

That would be great! Go for it.

solegalli avatar Feb 08 '22 01:02 solegalli