{"action":"opened","issue":{"url":"https://api.github.com/repos/tobgu/qframe/issues/8","repository_url":"https://api.github.com/repos/tobgu/qframe","labels_url":"https://api.github.com/repos/tobgu/qframe/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/tobgu/qframe/issues/8/comments","events_url":"https://api.github.com/repos/tobgu/qframe/issues/8/events","html_url":"https://github.com/tobgu/qframe/issues/8","id":361591410,"node_id":"MDU6SXNzdWUzNjE1OTE0MTA=","number":8,"title":"How do you add a new column / overwrite an existing column","user":{"login":"norandom","id":11855163,"node_id":"MDQ6VXNlcjExODU1MTYz","avatar_url":"https://avatars1.githubusercontent.com/u/11855163?v=4","gravatar_id":"","url":"https://api.github.com/users/norandom","html_url":"https://github.com/norandom","followers_url":"https://api.github.com/users/norandom/followers","following_url":"https://api.github.com/users/norandom/following{/other_user}","gists_url":"https://api.github.com/users/norandom/gists{/gist_id}","starred_url":"https://api.github.com/users/norandom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/norandom/subscriptions","organizations_url":"https://api.github.com/users/norandom/orgs","repos_url":"https://api.github.com/users/norandom/repos","events_url":"https://api.github.com/users/norandom/events{/privacy}","received_events_url":"https://api.github.com/users/norandom/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-19T06:06:19Z","updated_at":"2018-09-19T06:06:19Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nhow do you overwrite a column of a `qframe` object?\r\n\r\nI have a data-frame `qdf`.\r\n\r\nBased on the examples I used a `view` to iterate over the column. Within the `for` loop I apply a conversion (in this case a Epoch to human-readable timestamp conversion). \r\n\r\nI'd like to collect all the results into the slice `presult` and add it to the columns of a new `qdf`\r\n\r\n\tview := qdf.MustStringView(\"EdgeStartTimestamp\")\r\n\tpresult := make([]string, 1)\r\n\tfor i:=0; i < view.Len(); i++ {\r\n\t\titem := view.ItemAt(i)\r\n\t\tif citem, err  := strconv.Atoi(*item); err == nil {\r\n\t\t\tpresult = append(presult,\r\n\t\t\t\ttime.Unix(int64(citem) / 1000000000, 0).String())\r\n\t\t}\r\n\t}\r\n\r\nI can apply functions to one column, but I cannot add a new column:\r\n\r\n`qdf = qdf.Apply(qframe.Instruction{Fn: function.IntF, DstCol: \"EdgeStartTimestamp\", SrcCol1: \"EdgeStartTimestamp\" })`\r\n\r\nIn this particular case I convert the column `EdgeStartTimestamp`. My goal would be to have a column `timestamp` with the contents of `\"EdgeStartTimestamp\"` in the replaced `qdf` object.\r\n\r\nIs there a way to do this at the moment?\r\n\r\nBest,\r\nMarius"}}
{"actor":{"display_login":"norandom"}}