Issue
print('http://google.com')
outputs a clickable url.
How do I get clickable URLs for pd.DataFrame(['http://google.com', 'http://duckduckgo.com'])
?
Solution
Try using pd.DataFrame.style.format
for this:
df = pd.DataFrame(['http://google.com', 'http://duckduckgo.com'])
def make_clickable(val):
return '<a href="{}">{}</a>'.format(val,val)
df.style.format(make_clickable)
I hope this proves useful.
Answered By - Abdou
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.