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

Save a Frame to CSV #64

Open
darrenjw opened this issue Jun 3, 2015 · 3 comments
Open

Save a Frame to CSV #64

darrenjw opened this issue Jun 3, 2015 · 3 comments

Comments

@darrenjw
Copy link

darrenjw commented Jun 3, 2015

Perhaps I missed it, but I couldn't see an easy way to do this. It would obviously be very useful.

@darrenjw
Copy link
Author

I've been playing some more with this, and came up with the following, for converting a Frame, df:

Csv.fromFrame(new CsvFormat(",", header = true))(df).toString

which seems as though it ought to work. However, there's a problem with it. The initial header row is output with field names in the same order that they occur in the Frame. However, the actual data rows for some frames have their elements ordered differently to the order in which they occur in the data frame. The result is then a mismatch between the ordering of the header items and the data items, which is obviously a bad thing.

Is this a bug in the library somewhere?

@dwhitney
Copy link

I have seen the same issue, but I could not narrow down where the bug is occurring. It's interesting because calling .toString on the Frame does not result in the same error.

@tixxit
Copy link
Owner

tixxit commented Jul 23, 2015

Interesting - I suspect we are using the wrong index iteration order somewhere... I'll check it out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants