write_with_schema including Index to output

Highlighted
dataiku_user
Level 1
write_with_schema including Index to output
I need to write a pandas dataframe to dataiku output, with the index values. However the write_with_schema doesn't write out the index values
0 Kudos
1 Reply
Highlighted
Alex_Combessie Dataiker
Dataiker
Re: write_with_schema including Index to output
Hi,

Before using the `write_with_schema` method, you can put
df["index_col"] = df.index

Then your pandas data frame will have an actual "index_col" column written.

Cheers,

Alex
0 Kudos
Labels (1)