{"action":"created","issue":{"url":"https://api.github.com/repos/v0dro/daru/issues/20","labels_url":"https://api.github.com/repos/v0dro/daru/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/v0dro/daru/issues/20/comments","events_url":"https://api.github.com/repos/v0dro/daru/issues/20/events","html_url":"https://github.com/v0dro/daru/issues/20","id":105919828,"number":20,"title":"Can't rename columns?","user":{"login":"graft","id":292739,"avatar_url":"https://avatars.githubusercontent.com/u/292739?v=3","gravatar_id":"","url":"https://api.github.com/users/graft","html_url":"https://github.com/graft","followers_url":"https://api.github.com/users/graft/followers","following_url":"https://api.github.com/users/graft/following{/other_user}","gists_url":"https://api.github.com/users/graft/gists{/gist_id}","starred_url":"https://api.github.com/users/graft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graft/subscriptions","organizations_url":"https://api.github.com/users/graft/orgs","repos_url":"https://api.github.com/users/graft/repos","events_url":"https://api.github.com/users/graft/events{/privacy}","received_events_url":"https://api.github.com/users/graft/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-09-10T23:41:46Z","updated_at":"2015-09-13T15:24:39Z","closed_at":null,"body":"It seems to me that there is no way to rename columns, currently. You can access information about rownames and column names via #vectors and #index (which I think is unclear, see #19), both of which return a Daru::Index. However, there is no straightforward way to modify these values without remapping to an entirely new data frame, which seems a fairly large hole. Internally this information is stored both in @relation_hash, which is exposed but frozen, and in @keys, which is not exposed but seems redundant with @relation_hash.keys.\r\n\r\nIt seems like renaming rows or columns could be done by supporting an interface to rename keys in the Index, perhaps by keeping the @relation_hash unfrozen and exposing a []= method to remap a key."},"comment":{"url":"https://api.github.com/repos/v0dro/daru/issues/comments/139887130","html_url":"https://github.com/v0dro/daru/issues/20#issuecomment-139887130","issue_url":"https://api.github.com/repos/v0dro/daru/issues/20","id":139887130,"user":{"login":"graft","id":292739,"avatar_url":"https://avatars.githubusercontent.com/u/292739?v=3","gravatar_id":"","url":"https://api.github.com/users/graft","html_url":"https://github.com/graft","followers_url":"https://api.github.com/users/graft/followers","following_url":"https://api.github.com/users/graft/following{/other_user}","gists_url":"https://api.github.com/users/graft/gists{/gist_id}","starred_url":"https://api.github.com/users/graft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graft/subscriptions","organizations_url":"https://api.github.com/users/graft/orgs","repos_url":"https://api.github.com/users/graft/repos","events_url":"https://api.github.com/users/graft/events{/privacy}","received_events_url":"https://api.github.com/users/graft/received_events","type":"User","site_admin":false},"created_at":"2015-09-13T15:24:39Z","updated_at":"2015-09-13T15:24:39Z","body":"It seems like there are two different functions being performed by an Index - to store unique names for a row/column and to facilitate selections on them. I'm not sure this requires its own sort of object rather than making use of the already-available Vector type, which should allow both of these operations (assignment and selection).\r\n\r\nThe way R does selections is pretty simple - selections can take one of two forms, a logical vector or a set of row/column identifiers, and the [] interface of a dataframe responds to both of these. Daru is already pretty far afield from this level of simplicity, which is going to get hairier and hairier. If this is meant to be a simple, accessible base class, we shouldn't have to reach inside it to make secondary objects to manipulate it in these fundamental ways."}}