我的CSV文件的数据格式如下:
API Name Test Result Risk Rating Vulnerability Category
https://api-test.com FAIL LOW Information Gathering
https://api-test1.com PASS MEDIUM Authentication Test
https://api-test2.com SKIP HIGH Web Service
https://api-test1.com FAIL CRITICAL Configuration Management
https://api-test2.com PASS MEDIUM Configuration Management
https://api-test.com PASS CRITICAL Web Service
现在,我想要的是使用Plotly显示表中特定API的所有数据。因此,当我单击API的链接时,它应该在一个漂亮的表中显示该API的数据。对于前者如果我点击API https://api-test2.com,则应显示:
API Name Test Result Risk Rating Vulnerability Category
https://api-test2.com SKIP HIGH Web Service
https://api-test2.com PASS MEDIUM Configuration Management
我能够从Pandas处理所需格式的数据并在控制台上打印,但无法在html页面上显示。我的Pandas处理代码如下:
df = pd.read_csv('test1.csv',)
apis = df_new['API Name'].unique()
for api in apis:
print(df_new.loc[df['API Name'] == api])
任何帮助都将不胜感激。