Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/323.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中的dataframe中显示超链接,其中数据帧通过代码保存为html文件_Python_Pandas_Dataframe - Fatal编程技术网

试图在python中的dataframe中显示超链接,其中数据帧通过代码保存为html文件

试图在python中的dataframe中显示超链接,其中数据帧通过代码保存为html文件,python,pandas,dataframe,Python,Pandas,Dataframe,我正在尝试在html页面中添加超链接。html页面的内容是dataframe。html页面通过python代码保存在EFS中。当我在数据框中添加链接时,它将显示为文本,而不是href链接 df.insert(2,“Jira链接”,[dict(name='Google',url='1]http://www.google.com)、23、24、21、1、2、3、4、5、6],对) format({'url':使_可点击}) 打印(“Jira链接==”) 打印(df) def使_可点击(val): 返

我正在尝试在html页面中添加超链接。html页面的内容是dataframe。html页面通过python代码保存在EFS中。当我在数据框中添加链接时,它将显示为文本,而不是href链接

df.insert(2,“Jira链接”,[dict(name='Google',url='1]http://www.google.com)、23、24、21、1、2、3、4、5、6],对)
format({'url':使_可点击})
打印(“Jira链接==”)
打印(df)
def使_可点击(val):
返回“”。格式(val,val)
format({'url':使_可点击})
在另一个文件中,我将html文件保存为:

打开(efsPath+“/”+错误_文件,“w”)作为文件:
file.write(message0.format()+“\n\n\n\n”+message.format(error=trn\u errors.to\u html(na\u rep=“0”,escape=False))+“\n\n\n”+message1.format(error=api\u errors.to\u html(na\u rep=“0”)+“\n\n\n\n”+message3.format(error=js\u errors\u-by\u-path.to\u html(na\u rep=“0”)+“\n\n\n\n\n\n”+message2.format

其中message、message1等是html字符串值…

如果尝试
df.to_html(escape=False)
,表中的链接是否可单击?这是真的,它与escape=False一起工作。谢谢如果您尝试
df.to_html(escape=False)
,表中的链接是否可单击?没错,它与escape=False一起工作。谢谢