0

This is data frame i am working with: {'Image File': {0: 'C:\Users\Param1.png', 1: 'C:\Users\Param2.png', 2: 'C:\Users\Param3.png'}, 'Param': {0: 'Param1', 1: 'Param2', 2: 'Param3'}} I would like to create hyper link in csv file to Image File with following statement:

Data['HYPERLINK'] = "<a href=\"Test\">"+Data['Image File']+"</a>"

My problem that as hyperlink i see the path i am supplying in "Image File" column, but i am interested in Param column value be as caption for hyperlink. any thoughts? Thank you

2
  • Disagree, different issue Commented Jan 7, 2017 at 17:01
  • Table with additional column HYPERLINK with hyperlinks to image files while caption on hyperlinks are values from Param column Commented Jan 7, 2017 at 17:03

1 Answer 1

2

If you want the link text shown being your Param field, you need to add it to the link. In your example syntax this would be:

Data['HYPERLINK'] = "<a href=\"" + Data['Image File'] + "\">"+Data['Param']+"</a>"

The html link syntax is

<a href="url">link text</a>

see here for details: http://www.w3schools.com/html/html_links.asp

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.