Copy multiple rows/columns to clipboard

JCB
JCB Registered Posts: 7 ✭✭✭

Currently dataiku has a "copy rows to json" feature, which is great.

Is there a way to copy multiple rows instead of just one row in explore?

Also, would it be possible to highlight/select and copy to clipboard cells in explore, just like in Excel?

Tagged:

Answers

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,090 Neuron

    No, it's not possible. What's the use case? What are you trying to achieve?

  • JCB
    JCB Registered Posts: 7 ✭✭✭

    i copy snippets of data for stakeholder ad-hoc requests. I could do screenshots but they are not optimal for obvious reasons.

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,090 Neuron
    edited July 17

    Well I don't know about you but I never share a JSON copy/paste object with a stakeholder. I usually use Excel files for adhoc requests. So why not get that from the start rather than using copy/paste features that do not fit your use case properly? For instance the following code run in a Jupyter notebook will produce a CSV download link of a data frame read from a Dataiku dataset. The file is not even persisted so it's adhoc.

    from IPython.display import display, HTML
    import dataiku
    import base64
    
    display(HTML("<style>.container { width:100% !important; }</style>"))
    
    dataset = dataiku.Dataset("some_dataset_id")
    dataset_df = dataset.get_dataframe()
    
    def create_download_link( df, title = "Download CSV file", filename = "data.csv"):
        csv = df.to_csv()
        b64 = base64.b64encode(csv.encode())
        payload = b64.decode()
        html = '<a download="{filename}" href="data&colon;text/csv;base64,{payload}" target="_blank">{title}</a>'
        html = html.format(payload=payload,title=title,filename=filename)
        return HTML(html)
    
    create_download_link(dataset_df)

Setup Info
    Tags
      Help me…