joinery icon indicating copy to clipboard operation
joinery copied to clipboard

Export to CSV does not write row names

Open darkoc opened this issue 9 years ago • 4 comments

The Serialization.<V>writeCsv(final DataFrame<V> df, final OutputStream output) method doesn't write the row names if dfis a dataframe which has row names.

darkoc avatar Mar 04 '16 13:03 darkoc

So, turns out this writing the index is not supported by the csv library joinery uses. There is a workaround, you can add the index as a new column prior to writing the csv file:

df.add("labels", df.index()).writeCsv(...)

cardillo avatar Mar 19 '16 19:03 cardillo

Hi, can you assign this issue to me?

donggua223344 avatar Nov 12 '21 17:11 donggua223344

We should have this completed in the near future

rfraser3 avatar Nov 20 '21 23:11 rfraser3

As a heads up, the proposed solution above does not work. It adds the entire index name and all values to the single cell where the column header should be.

rfraser3 avatar Nov 20 '21 23:11 rfraser3