title: How to create a table with clickable hyperlink to a local file in pandas & Jupyter Notebook
body: <p>I learned from this post that I can link to a website in a Jupyter Notebook:
  <a href="https://stackoverflow.com/questions/42263946/how-to-create-a-table-with-clickable-hyperlink-in-pandas-jupyter-notebook/42264209#42264209">How to create a table with clickable hyperlink in pandas &amp; Jupyter Notebook</a></p>
  
  <p>So, I tried to adapt the code to create a dataframe with links to local files. However, when I click on the hyperlinks from the code below, nothing happens.</p>
  
  <p>How do I fix the code below for the hyperlinks to work?</p>
  
  <pre><code>import os
  import pandas as pd
  
  data = [dict(name='file1', 
          filepath='C:/Users/username/Documents/file1.docx'),
          dict(name='file2', 
          filepath='C:/Users/username/Documents/file2.docx')]
  
  df = pd.DataFrame(data)
  
  def make_clickable(url):
      name= os.path.basename(url)
      return '&lt;a href="file:///{}"&gt;{}&lt;/a&gt;'.format(url,name)
  
  df.style.format({'filepath': make_clickable})
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/NAq8n.png" rel="noreferrer"><img src="https://i.stack.imgur.com/NAq8n.png" alt="enter image description here"></a></p>