{"action":"opened","issue":{"url":"https://api.github.com/repos/pydata/pandas/issues/13957","repository_url":"https://api.github.com/repos/pydata/pandas","labels_url":"https://api.github.com/repos/pydata/pandas/issues/13957/labels{/name}","comments_url":"https://api.github.com/repos/pydata/pandas/issues/13957/comments","events_url":"https://api.github.com/repos/pydata/pandas/issues/13957/events","html_url":"https://github.com/pydata/pandas/issues/13957","id":170412179,"number":13957,"title":"DataFrame.update() changes type of boolean column to Object.","user":{"login":"Sereger13","id":10167353,"avatar_url":"https://avatars.githubusercontent.com/u/10167353?v=3","gravatar_id":"","url":"https://api.github.com/users/Sereger13","html_url":"https://github.com/Sereger13","followers_url":"https://api.github.com/users/Sereger13/followers","following_url":"https://api.github.com/users/Sereger13/following{/other_user}","gists_url":"https://api.github.com/users/Sereger13/gists{/gist_id}","starred_url":"https://api.github.com/users/Sereger13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sereger13/subscriptions","organizations_url":"https://api.github.com/users/Sereger13/orgs","repos_url":"https://api.github.com/users/Sereger13/repos","events_url":"https://api.github.com/users/Sereger13/events{/privacy}","received_events_url":"https://api.github.com/users/Sereger13/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-10T13:06:14Z","updated_at":"2016-08-10T13:06:14Z","closed_at":null,"body":"After applying DataFrame.update() on a DataFrame that has boolean column the type of that column changes to Object and filtering stops working as negate operator (~) produces '-1' series instead of 'True'.\r\n#### Code Sample, a copy-pastable example if possible\r\n```python\r\ndf = pd.DataFrame({'a': [1, 2, 3], 'b': ['notset'] * 3, 'c': [False] * 3})\r\ndf.set_index('a', inplace=True)\r\n\r\ndf_update_from = pd.DataFrame({'a': [2, 3], 'b': ['updated2', 'updated3'], 'c': [False, False]})\r\ndf_update_from.set_index('a', inplace=True)\r\ndf.update(df_update_from)\r\n~df.c\r\n```\r\n#### Expected Output\r\n>a\r\n1    True\r\n2    True\r\n3    True\r\nName: c, dtype: bool\r\n\r\n### Actual Output\r\n>a\r\n1    -1\r\n2    -1\r\n3    -1\r\nName: c, dtype: object\r\n\r\n#### output of ``pd.show_versions()``\r\nINSTALLED VERSIONS\r\n------------------\r\ncommit: None\r\npython: 2.7.9.final.0\r\npython-bits: 64\r\nOS: Linux\r\nOS-release: 2.6.18-238.9.1.el5\r\nmachine: x86_64\r\nprocessor: x86_64\r\nbyteorder: little\r\nLC_ALL: None\r\nLANG: en_US\r\n\r\npandas: 0.16.2\r\nnose: 1.3.4\r\nCython: 0.22\r\nnumpy: 1.9.2\r\nscipy: 0.15.1\r\nstatsmodels: 0.6.1\r\nIPython: 3.0.0\r\nsphinx: 1.3.1\r\npatsy: 0.3.0\r\ndateutil: 2.4.1\r\npytz: 2016.3\r\nbottleneck: None\r\ntables: 3.1.1\r\nnumexpr: 2.3.1\r\nmatplotlib: 1.4.3\r\nopenpyxl: 1.8.5\r\nxlrd: 0.9.3\r\nxlwt: 0.7.5\r\nxlsxwriter: 0.6.7\r\nlxml: 3.4.2\r\nbs4: 4.3.2\r\nhtml5lib: None\r\nhttplib2: None\r\napiclient: None\r\nsqlalchemy: 1.0.9\r\npymysql: None\r\npsycopg2: None\r\n"}}
{"actor":{"display_login":"Sereger13"}}