簡體   English   中英

使用python將超鏈接添加到csv

[英]Adding hyperlink to a csv using python

我正在嘗試向 csv 添加超鏈接。 我從 ArcGIS Survey123 導出了數據和附件。 csv 只有照片的文件名,

photos_20220216144827.jpg, photos_20220329110509.jpg, 60th_virtual_background.jpg

我想添加一個超鏈接以更快地訪問圖像。 所有照片都保存在以下目錄B:\Survey123\survey_attachments

我能夠用這行代碼弄清楚。

# Adding hyperlink
df = pd.read_excel(surveyResults)
df['Column containing image name'] = '=HYPERLINK("location of folder containing images' + df["Column containing image name"] + '")'
df.to_excel('location where to save new excel', index=False)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM