display hyperlink and access them via dataiku

Options
Kenza29
Kenza29 Registered Posts: 7 ✭✭✭

Hello,

I have constructed links in my dataframe based on other dataframe columns and I defined a python function to make those hyperlinks clickable but it doesn't work, do you have any idea on how to make these hyperlinks clickable ?

Thank you in advance

Kenza

Answers

  • CoreyS
    CoreyS Dataiker Alumni, Dataiku DSS Core Designer, Dataiku DSS Core Concepts, Registered Posts: 1,150 ✭✭✭✭✭✭✭✭✭
    Options

    Hi, @Kenza29
    ! Can you provide any further details on the thread to assist users in helping you find a solution (insert examples like DSS version etc.) Also, can you let us know if you’ve tried any fixes already?This should lead to a quicker response from the community.

  • Kenza29
    Kenza29 Registered Posts: 7 ✭✭✭
    edited July 17
    Options

    Hello,

    this is my actual code in python :

    # -*- coding: utf-8 -*-
    import dataiku
    import pandas as pd, numpy as np
    from dataiku import pandasutils as pdu
    
    # Read recipe inputs
    link_to_source = dataiku.Dataset("Link_to_source")
    link_to_source_df = link_to_source.get_dataframe()
    df = pd.DataFrame(link_to_source_df)
    df['url'] = 'https://bitbucket.clamart-fr0010.slb.com:8443/projects/EM/repos/' + df["Board name"] + '/browse/firmware/src/' + df["FileName"]
    def make_clickable(val):
        return '<a href="{}">{}</a>'.format(val,val)
    df[['url']].style.format(make_clickable)
    link_df = df  # For this sample code, simply copy input to output
    
    # Write recipe outputs
    link = dataiku.Dataset("Link")
    link.write_with_schema(link_df)

    the function make clickable is not working : I am getting the link but I can't click on them to go to the page that is referenced in this link.

    I have : Dataiku DSS Version 9.0.1

    I hope it's more clear now

    Thanks for your help

    Kenza

Setup Info
    Tags
      Help me…