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

Should column names be symbols? #134

Closed
hayd opened this issue Jun 23, 2014 · 8 comments
Closed

Should column names be symbols? #134

hayd opened this issue Jun 23, 2014 · 8 comments

Comments

@hayd
Copy link

hayd commented Jun 23, 2014

DataFrames.jl allows only symbol column names, whilst it looks like TimeSeries column names must be UTF8String.

JuliaData/DataFrames.jl#509

@quinnj
Copy link
Member

quinnj commented Jun 23, 2014

+1, I think it would be good to mirror DataFrames here. I think they've put a lot of thought into this and it will be better to be consistent in the long run (even though we don't have an explicit dependency).

@milktrader
Copy link
Contributor

I haven't evaluated the discussion yet as to why they switched, but I'm open to the idea. What are the main benefits of doing this?

@quinnj
Copy link
Member

quinnj commented Jun 23, 2014

I think one of the main ideas was preparing for the planned feature of overloading the dot operator so you can access columns like R. df = DataFrame(...); df.col1.

@hayd
Copy link
Author

hayd commented Jun 24, 2014

There is also the issue with only being valid identifiers (presumably for the overloading reason). JuliaData/DataFrames.jl#520 & JuliaData/DataFrames.jl#617

@garborg
Copy link
Member

garborg commented Jun 24, 2014

I think parsing formula expressions is another reason: JuliaData/DataFrames.jl#618. I'm now sure what else there might be.

@milktrader
Copy link
Contributor

@milktrader
Copy link
Contributor

This feature doesn't allow spaces in column names, so that would be a loss. There would need to be some new constraint to enforce that there are no spaces in the colnames field. There are actually quite a bit of column names in time series data that does include a space.

@milktrader
Copy link
Contributor

Not sure the pros outweigh the cons. Some developments in Base JuliaLang/julia#9945 (comment)

Closing for now.

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 a pull request may close this issue.

4 participants