-+
>>> |2017-08-11|[2017-05-30,2017-10-01]|
>>>
>>>
>>> calculate a column called "days_from_nearest_holiday" which calculates the
>>> difference between 11 aug 2017 and 1 oct 2017?
>>>
>>>
>>>
>&g
t;>
>>
>>
>> On Tue, Apr 25, 2017 at 6:00 PM, Wen Pei Yu wrote:
>>
>>> TypeError: unorderable types: str() >= datetime.date()
>>>
>>> Should transfer string to Date type when compare.
>>>
>>> Yu Wenpei.
>>&g
>
>> TypeError: unorderable types: str() >= datetime.date()
>>
>> Should transfer string to Date type when compare.
>>
>> Yu Wenpei.
>>
>>
>> - Original message -
>> From: Zeming Yu
>> To: user
>> Cc:
>> Subject:
er string to Date type when compare.
>
> Yu Wenpei.
>
>
> - Original message -
> From: Zeming Yu
> To: user
> Cc:
> Subject: how to find the nearest holiday
> Date: Tue, Apr 25, 2017 3:39 PM
>
> I have a column of dates (date type), just trying to find t
TypeError: unorderable types: str() >= datetime.date()
Should transfer string to Date type when compare.
Yu Wenpei.
- Original message -From: Zeming Yu To: user Cc:Subject: how to find the nearest holidayDate: Tue, Apr 25, 2017 3:39 PM
I have a column of dates (date type), just tryin
I have a column of dates (date type), just trying to find the nearest
holiday of the date. Anyone has any idea what went wrong below?
start_date_test = flight3.select("start_date").distinct()
start_date_test.show()
holidays = ['2017-09-01', '2017-10-01']
+--+
|start_date|
+--+