Writing multiple files into a folder

Ksawery
Ksawery Registered Posts: 2 ✭✭✭
edited July 16 in Using Dataiku

Hi,

I would like to write multiple files into a Dataiku folder. Unfortunately, when I do the following, I am getting an error:

The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

The error that I am getting is:

data_df = dataiku.Dataset("data")
data = data.get_dataframe()

output = dataiku.Folder("2jiawe32x")

for cnt in data.country.unique():
 df = data[data.country == cnt]
 output.upload_stream(str(cnt), df)

Is there any workaround?

Answers

Setup Info
    Tags
      Help me…