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

Use Symbols as column names #136

Closed
wants to merge 1 commit into from
Closed

Conversation

hayd
Copy link

@hayd hayd commented Jun 23, 2014

fixes #134

Should work as before when passing strings as column names: they're cast as symbols.

New to Julia so comments/thoughts/pointers welcome.

Now I think about it maybe should also check identifiers (again inline with DataFrames), but I don't think there is a Base implementation of that yet?...

@@ -4,7 +4,7 @@
for op in [:.+, :.-, :.*, :./]
@eval begin
function ($op){T,N}(ta1::TimeArray{T,N}, ta2::TimeArray{T,N})
cname = [ta1.colnames[1][1:2] * string($op) * ta2.colnames[1][1:2]]
cname = [string(ta1.colnames[1])[1:2] * string($op) * string(ta2.colnames[1])[1:2]]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this should be dried out. string(ta1.colnames[1])[1:2] appears a few times here.

@milktrader
Copy link
Contributor

@milktrader
Copy link
Contributor

I'm closing this for now since the motivation behind using Symbols vs Strings for column names doesn't seem to be an improvement and will disallow spaces in column names.

@milktrader milktrader closed this Feb 20, 2015
@hayd
Copy link
Author

hayd commented Feb 20, 2015

Apologies, I thought this was long closed. Thanks.

@hayd hayd deleted the symbol_cols branch February 20, 2015 22:00
@milktrader
Copy link
Contributor

No problem. Thanks for tossing it out there for us to consider.

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.

Should column names be symbols?
2 participants