I have data like this:
df = sqlContext.createDataFrame([
('1986/10/15', 'z', 'null'),
('1986/10/15', 'z', 'null'),
('1986/10/15', 'c', 'null'),
('1986/10/15', 'null', 'null'),
('1986/10/16', 'null', '4.0')],
('low', 'high', 'normal'))
I want to calculate the date difference between low
column and 2017-05-02
and replace low
column with the difference. I've tried related solutions on stackoverflow but neither of them works.