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

Skip comments #49

Open
cbrown1 opened this issue Apr 23, 2018 · 2 comments
Open

Skip comments #49

cbrown1 opened this issue Apr 23, 2018 · 2 comments

Comments

@cbrown1
Copy link

cbrown1 commented Apr 23, 2018

Hi,
Nice plugin. I use csv files with comments at the top, and it would be great if those could be skipped when justifying the rows. Here is an example:

# This is a comment at the top of a csv file
# There may be more than one comment line

Header1,Header2,Header3
data1,data2,data3
data-a,data-b,data-c

@justinmcgrath
Copy link

justinmcgrath commented Mar 6, 2019

I do this as well, but I also uses rows to include units and descriptions for nonobvious columns. If it didn't justify any comment, then those wouldn't get justified. I can't think of a straightforward way to sensibly choose whether to justify. Maybe only justify if the row contains delimiters?

# Data collected from blah blah.
#, , , Above ground yield.
#, , , kg / m^2
line_id, plot_id, year, yield
WT S NN, A, 2014, 0.439595491985597
WT S NN, B, 2014, 0.375006810619682

@cbrown1
Copy link
Author

cbrown1 commented Mar 6, 2019

I have seen this handled in other contexts (eg., numpy import) with a parameter to specify the comment character, and in which '#' is almost always the default. Any line that starts with any of the specified comment characters is skipped. The other way (looking for delimiters) often doesn't work because comments could contain that character.

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

2 participants