managed folder with multiple dataframes

Options
ltounsi
ltounsi Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 3

hello

i have a python recipe with multiple data frames as output i would like to know how to put all these output into one managed folder.

regards.

Tagged:

Answers

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,727 Neuron
    edited July 17
    Options

    The following Python code in a Python recipe will output the contents of the df dataframe to a CSV file:

    import dataiku
    
    path_upload_file = "output.csv"
    handle = dataiku.Folder("Some Managed Folder")
    
    with handle.get_writer(path_upload_file) as w:
        w.write(df.to_csv().encode('utf-8'))

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,727 Neuron
    Options

    You can also use the Export to Folder visual recipe but that only allows to write back a single output at a time.

Setup Info
    Tags
      Help me…