How to save file in subfolder when I using dataiku.Folder("xxxxxx")?

Options
dataicool
dataicool Registered Posts: 6
edited July 16 in Using Dataiku

python code, I save dataframe as csv:

#df is pd.DataFrame
csv_name = "data.csv"

handle = dataiku.Folder("xxxxxxx")
    with handle.get_writer(csv_name) as w:
    w.write(df.to_csv().encode('utf-8'))

Now I want to save csv in subfolder,

for example save_path = dataiku.Folder("xxxxxxx")/subfolder1/data.csv

how to change my code?

thanks


Operating system used: windows

Answers

Setup Info
    Tags
      Help me…