-
Notifications
You must be signed in to change notification settings - Fork 13
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
ENH: implemented arbitrary data separator, for now supported Tab and Comma. #15
Conversation
lvm_read.py
Outdated
if line.startswith('Separator'): | ||
separator = line.strip()[10:] | ||
break | ||
file.seek(0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using file.seek
will fail when calling from read_str
lvm_read.py
Outdated
break | ||
file.seek(0) | ||
if separator in separators.keys(): | ||
return separators[separator] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the specification: "To find out what the separator character(s) is, read the entire header block and search for the keyword Separator. The character(s) that follows the keyword is the separator." Any separator can be supported by just using the character following 'Separator'.
lvm_read.py
Outdated
} | ||
for line in file: | ||
if line.startswith('Separator'): | ||
separator = line.strip()[10:] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could cause an Indexation error if a writer decides to write a header like:
Separator;
Thank you for the suggestions. I made a few changes to address the issues opened. Any further ideas? |
Changes look good. |
|
This is a PR handling arbitrary data separator.