{"action":"created","issue":{"url":"https://api.github.com/repos/pydata/pandas/issues/10264","labels_url":"https://api.github.com/repos/pydata/pandas/issues/10264/labels{/name}","comments_url":"https://api.github.com/repos/pydata/pandas/issues/10264/comments","events_url":"https://api.github.com/repos/pydata/pandas/issues/10264/events","html_url":"https://github.com/pydata/pandas/issues/10264","id":84771124,"number":10264,"title":"view into modified dataframe of ints causes subsequent set_value to not work properly","user":{"login":"jbezaire","id":6933145,"avatar_url":"https://avatars.githubusercontent.com/u/6933145?v=3","gravatar_id":"","url":"https://api.github.com/users/jbezaire","html_url":"https://github.com/jbezaire","followers_url":"https://api.github.com/users/jbezaire/followers","following_url":"https://api.github.com/users/jbezaire/following{/other_user}","gists_url":"https://api.github.com/users/jbezaire/gists{/gist_id}","starred_url":"https://api.github.com/users/jbezaire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbezaire/subscriptions","organizations_url":"https://api.github.com/users/jbezaire/orgs","repos_url":"https://api.github.com/users/jbezaire/repos","events_url":"https://api.github.com/users/jbezaire/events{/privacy}","received_events_url":"https://api.github.com/users/jbezaire/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pydata/pandas/labels/Bug","name":"Bug","color":"e10c02"},{"url":"https://api.github.com/repos/pydata/pandas/labels/Indexing","name":"Indexing","color":"0b02e1"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-06-03T21:05:16Z","updated_at":"2015-06-04T02:01:33Z","closed_at":null,"body":"The following code snippet produces unexpected output:\r\n\r\n```python\r\nimport pandas as pd\r\nimport numpy as np\r\nx = pd.DataFrame(data=np.zeros((5,5),dtype=np.int),columns=['a','b','c','d','e'])\r\nx['f'] = 0\r\nx.f.values[3]=1\r\ny = x.iloc[np.arange(2,len(x))]\r\nx.f.values[3]=2\r\nprint x\r\nprint x.f.values\r\n```\r\n```\r\nOut[130]: \r\n   a  b  c  d  e  f\r\n0  0  0  0  0  0  0\r\n1  0  0  0  0  0  0\r\n2  0  0  0  0  0  0\r\n3  0  0  0  0  0  1\r\n4  0  0  0  0  0  0\r\n[0 0 0 2 0]\r\n```\r\n\r\nThe expected output is:\r\n```\r\nOut[131]: \r\n   a  b  c  d  e  f\r\n0  0  0  0  0  0  0\r\n1  0  0  0  0  0  0\r\n2  0  0  0  0  0  0\r\n3  0  0  0  0  0  2\r\n4  0  0  0  0  0  0\r\n[0 0 0 2 0]\r\n```\r\n\r\nThe behavior only manifests if the dataframe has had a column added to it (f in this case), if the columns are ints, and if the view is constructed with certain kinds of indexing (y=x.iloc[2:] works fine for instance).\r\n\r\nHere is my version info:\r\nINSTALLED VERSIONS\r\n------------------\r\ncommit: None\r\npython: 2.7.7.final.0\r\npython-bits: 64\r\nOS: Linux\r\nOS-release: 3.10.0-229.4.2.el7.jump.x86_64\r\nmachine: x86_64\r\nprocessor: x86_64\r\nbyteorder: little\r\nLC_ALL: None\r\nLANG: en_US.UTF-8\r\n\r\npandas: 0.15.2.dev\r\nnose: 1.3.4\r\nCython: 0.20.2\r\nnumpy: 1.9.0\r\nscipy: 0.14.1rc1.dev-Unknown\r\nstatsmodels: None\r\nIPython: 3.1.0\r\nsphinx: 1.3b1\r\npatsy: 0.3.0\r\ndateutil: 2.2\r\npytz: 2014.10\r\nbottleneck: 0.8.0\r\ntables: 3.1.1\r\nnumexpr: 2.3.1\r\nmatplotlib: 1.4.0\r\nopenpyxl: 2.1.4\r\nxlrd: None\r\nxlwt: None\r\nxlsxwriter: None\r\nlxml: 3.4.2\r\nbs4: 4.3.2\r\nhtml5lib: None\r\nhttplib2: None\r\napiclient: None\r\nrpy2: 2.4.3\r\nsqlalchemy: None\r\npymysql: 0.6.2.None\r\npsycopg2: 2.5.4 (dt dec pq3 ext)\r\n"},"comment":{"url":"https://api.github.com/repos/pydata/pandas/issues/comments/108680373","html_url":"https://github.com/pydata/pandas/issues/10264#issuecomment-108680373","issue_url":"https://api.github.com/repos/pydata/pandas/issues/10264","id":108680373,"user":{"login":"TomAugspurger","id":1312546,"avatar_url":"https://avatars.githubusercontent.com/u/1312546?v=3","gravatar_id":"","url":"https://api.github.com/users/TomAugspurger","html_url":"https://github.com/TomAugspurger","followers_url":"https://api.github.com/users/TomAugspurger/followers","following_url":"https://api.github.com/users/TomAugspurger/following{/other_user}","gists_url":"https://api.github.com/users/TomAugspurger/gists{/gist_id}","starred_url":"https://api.github.com/users/TomAugspurger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomAugspurger/subscriptions","organizations_url":"https://api.github.com/users/TomAugspurger/orgs","repos_url":"https://api.github.com/users/TomAugspurger/repos","events_url":"https://api.github.com/users/TomAugspurger/events{/privacy}","received_events_url":"https://api.github.com/users/TomAugspurger/received_events","type":"User","site_admin":false},"created_at":"2015-06-04T02:01:33Z","updated_at":"2015-06-04T02:01:33Z","body":"From the [docs](http://pandas.pydata.org/pandas-docs/version/0.16.1/basics.html#attributes-and-the-raw-ndarray-s)\r\n\r\n> If a DataFrame or Panel contains homogeneously-typed data, the ndarray can actually be modified in-place, and the changes will be reflected in the data structure.\r\n\r\nSo we'll need to update that or call this a bug. Perhaps we should remove that section either way and encourage users to use `.loc` for setting?"}}