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

Use stdlib csv module to write csv #206

Closed
wants to merge 1 commit into from

Conversation

takluyver
Copy link
Contributor

I noticed while using pandas that data with commas in the fields wasn't getting escaped properly when written to CSV (data in biology often has bits of text as well as numbers). This causes the data to spread out over extra columns. This commit uses the csv module from the standard library to write out CSV 'properly'.

I've also added a simple test for this case.

@wesm
Copy link
Member

wesm commented Oct 9, 2011

Cool. I was actually made aware of this a while ago but as you can see forgot to fix it ;) I'm sure performance is better, too.

@wesm wesm closed this Oct 9, 2011
@takluyver
Copy link
Contributor Author

I wouldn't expect a big performance difference, but it may be a bit faster, since I think csv.writer is implemented in C.

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

Successfully merging this pull request may close these issues.

2 participants