I have a dataframe with multiple date columns.
I want to add an additional date column to the dataframe called maxDate.
Per row I want to efficiently aggregate the newest date, and set it as value for the maxDate column.
Example source dataframe:
| id | colA | dateColB | dateColC |
====================================================================
| 1 | foo | 2019-11-13T00:00:00.000Z | 2019-11-15T00:00:00.000Z |
| 2 | bar | 2020-09-28T00:00:00.000Z | 2020-06-01T00:00:00.000Z |
| 3 | zoo | | 2020-06-01T00:00:00.000Z |
| 4 | beer | | |
Example target dataframe:
| id | colA | dateColB | dateColC | maxDate |
===============================================================================================
| 1 | foo | 2019-11-13T00:00:00.000Z | 2019-11-15T00:00:00.000Z | 2019-11-15T00:00:00.000Z |
| 2 | bar | 2020-09-28T00:00:00.000Z | 2020-06-01T00:00:00.000Z | 2020-09-28T00:00:00.000Z |
| 3 | zoo | | 2020-06-01T00:00:00.000Z | 2020-06-01T00:00:00.000Z |
| 4 | beer | | | |
What do you recommend to use from grok javascript api to accomplish this?