Python 3.x 使用条件格式pd.xlsxwriter比较两个日期
我有一个如下的数据帧。现在,如果到期日期<今天的日期,我需要使用条件格式以红色突出显示整行 我尝试了下面的代码,但是我得到一个错误,说“今天”没有定义Python 3.x 使用条件格式pd.xlsxwriter比较两个日期,python-3.x,xlsxwriter,Python 3.x,Xlsxwriter,我有一个如下的数据帧。现在,如果到期日期
date = TODAY()
worksheet.conditional_format('C1:C6', {'type': 'date',
'criteria': 'less than',
'value': date,
'format': red})