{"action":"opened","issue":{"url":"https://api.github.com/repos/JuliaStats/DataFrames.jl/issues/1051","repository_url":"https://api.github.com/repos/JuliaStats/DataFrames.jl","labels_url":"https://api.github.com/repos/JuliaStats/DataFrames.jl/issues/1051/labels{/name}","comments_url":"https://api.github.com/repos/JuliaStats/DataFrames.jl/issues/1051/comments","events_url":"https://api.github.com/repos/JuliaStats/DataFrames.jl/issues/1051/events","html_url":"https://github.com/JuliaStats/DataFrames.jl/issues/1051","id":174967601,"number":1051,"title":"julia dataframe changing one cell changes entire row","user":{"login":"xximranxx","id":6705600,"avatar_url":"https://avatars.githubusercontent.com/u/6705600?v=3","gravatar_id":"","url":"https://api.github.com/users/xximranxx","html_url":"https://github.com/xximranxx","followers_url":"https://api.github.com/users/xximranxx/followers","following_url":"https://api.github.com/users/xximranxx/following{/other_user}","gists_url":"https://api.github.com/users/xximranxx/gists{/gist_id}","starred_url":"https://api.github.com/users/xximranxx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xximranxx/subscriptions","organizations_url":"https://api.github.com/users/xximranxx/orgs","repos_url":"https://api.github.com/users/xximranxx/repos","events_url":"https://api.github.com/users/xximranxx/events{/privacy}","received_events_url":"https://api.github.com/users/xximranxx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-04T20:19:36Z","updated_at":"2016-09-04T20:19:36Z","closed_at":null,"body":"Consider the following code, where I want to change only 1 cell, but the entire row gets changed:\r\n\r\n```\r\ndf=DataFrames.DataFrame(A=[1,2],B=[3,4])\r\n\r\ndf[2,:A]=7 # this is OK, changes only 1 cell\r\n\r\ndf[:,1:end]=0.0 # this line somehow makes the change in the next line behave unexpectedly\r\n\r\ndf[2,:A]=7 # entire 2nd row is 7\r\n\r\n```\r\n\r\nIt's as if the df[:,1:end]=0.0 sets all the cells of that row to the same reference; but I am setting it to 0.0, so I expect this to be a value copy, not reference copy\r\n\r\nVersions: julia version 0.4.6-pre DataFrames v\"0.7.8\"\r\n\r\nBtw, I first put this on stackoverflow: http://stackoverflow.com/questions/39320783/julia-dataframe-changing-one-cell-changes-entire-row"}}
{"actor":{"display_login":"xximranxx"}}