-
-
Notifications
You must be signed in to change notification settings - Fork 11k
genfromtxt reading quoted csv files enhancement (Trac #1615) #2211
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
Comments
trac user alefnula wrote on 2010-09-15 I had a mistake in the example csv, it should look like: "This is my text, that has a comma inside","Other value","3"[[BR]] |
Attachment added by trac user alefnula on 2010-09-15: patch.diff |
@rgommers wrote on 2011-03-31 A unit test would be helpful. |
Will this issue be fixed? |
@jseidel Want to open an PR? |
Based off patch in numpy#2211. Implements custom split method and adds keywd.
@mattip is this an issue I can work on? |
We don't usually assign issues, the rule is that the first person to file a PR should link back to the issue to indicate they are giving it a try. Note that the patch is a broken link so you will have to recreate it. Tests are of course critical, |
Is there a reason to use |
@ddasilva I'm not sure if this counts as a reason, but one advantage could be that the output is a |
@hypercubestart @eric-wieser is this issue still active ? |
@tinaoberoi not sure, but from the discussion here #14577 it feels like the general sentiment is to just use pandas.read_csv |
I would like to work on this issue, I followed the earlier PRs and the discussion. I agree with @hypercubestart suggestion of: |
@tinaoberoi yes that seems like a good solution. Longer-term, @WarrenWeckesser is working on a better text reader for numpy. |
Original ticket http://projects.scipy.org/numpy/ticket/1615 on 2010-09-15 by trac user alefnula, assigned to unknown.
genfromtxt cannot handle the csv files that use quoting. For example:
"This is my text, that has a comma inside","Other value","3"
"Another text, with coma","More text, with comma",5
This is a csv text where the delimiter is ",", but the values also contain ",".
Here is the pach that enables the user to specify the quoter (the quoting character). The default behaviour is the same as the old behaviour of genfromtxt function, but if the quoter is set, quoting is taken into account.
Patch is in the attachment.
The text was updated successfully, but these errors were encountered: