h2o-tutorials
h2o-tutorials copied to clipboard
How to calculate the time differences of two date fields?
Overview
Basically I have a few date fields, say day1, day2 stuff and I want to calculate the year/month/day differences between these fields. Direct minus of those fields give a ns format
test_date_df = df['END_DT'] - df['START_DT']
test_date_df.dtype
dtype is dtype('<U')
1 row example:
1.97096e+12
I did not find a proper workaround to convert this 1.97096e+12 into year/month/day, it is great if the operation can be done with native H2O function or I expect this function works with multi-cores so that the out of memory error is not a concern as I have huge volume of data.
With Pandas it is very handy to work this out with multi-processing but just check out if someone has a solution with H2O