Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export to CSV does not write row names #51

Open
darkoc opened this issue Mar 4, 2016 · 4 comments · May be fixed by #101
Open

Export to CSV does not write row names #51

darkoc opened this issue Mar 4, 2016 · 4 comments · May be fixed by #101
Assignees
Milestone

Comments

@darkoc
Copy link

darkoc commented Mar 4, 2016

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.

@cardillo cardillo added the bug label Mar 5, 2016
@cardillo cardillo added this to the 1.8 milestone Mar 5, 2016
@cardillo cardillo self-assigned this Mar 5, 2016
@cardillo
Copy link
Owner

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 cardillo removed this from the 1.8 milestone Mar 19, 2016
@cardillo cardillo added enhancement and removed bug labels Mar 19, 2016
@cardillo cardillo added this to the v2.0 milestone Dec 28, 2016
@cardillo cardillo modified the milestones: v2.0, v1.10 Mar 25, 2020
@cardillo cardillo modified the milestones: v1.10, v1.11 Oct 18, 2021
@donggua223344
Copy link

Hi, can you assign this issue to me?

@rfraser3
Copy link

We should have this completed in the near future

@rfraser3
Copy link

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.

@Wei-Ping-Lam Wei-Ping-Lam linked a pull request Nov 21, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants