How to create a table with clickable hyperlink in pandas & Jupyter Notebook

前端 未结 4 1610
北荒
北荒 2020-11-27 17:19

print(\'http://google.com\') outputs a clickable url.

How do I get clickable URLs for pd.DataFrame([\'http://google.com\', \'http://duckduckgo.com

4条回答
  •  鱼传尺愫
    2020-11-27 18:01

    @shantanuo : not enough reputation to comment. How about the following?

    def make_clickable(url, name):
        return '{}'.format(url,name)
    
    df['name'] = df.apply(lambda x: make_clickable(x['url'], x['name']), axis=1)
    
    

提交回复
热议问题