Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 3.x 使用条件格式pd.xlsxwriter比较两个日期_Python 3.x_Xlsxwriter - Fatal编程技术网

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})