Skip to content

Added delimiter sniffing (comma, tab, semicolon)#81

Open
yconst wants to merge 1 commit intodavedelong:masterfrom
yconst:master
Open

Added delimiter sniffing (comma, tab, semicolon)#81
yconst wants to merge 1 commit intodavedelong:masterfrom
yconst:master

Conversation

@yconst
Copy link

@yconst yconst commented Apr 1, 2015

I've added a routine to detect the correct delimiter among comma, semicolon and tab. Replaced the default use of a comma as a delimiter with delimiter sniffing in method calls. Newline is passed as a dummy parameter to denote that we want delimiter sniffing.

@yconst
Copy link
Author

yconst commented Apr 1, 2015

Good point about NEWLINE. Do you think the assertion is required? _sniffDelimiter() will assign to _delimiter one of COMMA, TAB or SEMICOLON in any case.

@davedelong
Copy link
Owner

The assertion is definitely needed, since they could invoke the method with '\r' as the delimiter, for example.

@damienvieira
Copy link

Hi guys, I was wondering why this PR was never merged?

After some quick tests over different CSV files separated by comma or semi colon, it seems to be working as expected.

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.

3 participants