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

Make sure column names are valid identifiers #520

Closed
johnmyleswhite opened this issue Jan 31, 2014 · 6 comments
Closed

Make sure column names are valid identifiers #520

johnmyleswhite opened this issue Jan 31, 2014 · 6 comments
Labels

Comments

@johnmyleswhite
Copy link
Contributor

We should make sure that readtable guarantees that all column names are valid identifiers. If we're not doing this now (I'm not sure), we should.

@garborg
Copy link
Contributor

garborg commented Jan 31, 2014

Warn when coercing invalid names pulled from file and when invalid names are passed to colnames?

@johnmyleswhite
Copy link
Contributor Author

I'm cool with warning, but we should be willing to budge on that if enough people complain.

I'd say we should raise errors when setting column names using names!.

@vchuravy
Copy link
Contributor

Currently(0.5.4) the following problem arises:

Given a csv file with the following header:
Generation, Group, BlueTest

The column names are read as
:Generation
: Group
: BlueTest

readTable should either strip white space or allow for multiple-char separator..
I use almost always ", " as a separator for better readability. The data is handled correctly but the the column names result in non-valid identifieres

@garborg
Copy link
Contributor

garborg commented Feb 27, 2014

Thanks for reporting, I'll clean this up.

@johnmyleswhite I'll adapt your makeidentifiers code unless you've done anything else along those lines.

@johnmyleswhite
Copy link
Contributor Author

Please go ahead. I also noticed a bug with column names the other day, but didn't track it down.

At some point, we need to sync with Base about makeidentifiers to deal with the Unicode normalization work they've been doing.

@garborg
Copy link
Contributor

garborg commented Feb 27, 2014

Good call.

garborg added a commit that referenced this issue Mar 12, 2014
Ensure column names are valid identifiers. Closes #520
dcjones added a commit to GiovineItalia/Gadfly.jl that referenced this issue Mar 25, 2014
nalimilan pushed a commit that referenced this issue May 26, 2022
Ensure column names are valid identifiers. Closes #520
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants