Description
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'.
Code Sample, a copy-pastable example if possible
df = pd.DataFrame({'a': [1, 2, 3], 'b': ['notset'] * 3, 'c': [False] * 3})
df.set_index('a', inplace=True)
df_update_from = pd.DataFrame({'a': [2, 3], 'b': ['updated2', 'updated3'], 'c': [False, False]})
df_update_from.set_index('a', inplace=True)
df.update(df_update_from)
~df.c
Expected Output
a
1 True
2 True
3 True
Name: c, dtype: bool
Actual Output
a
1 -1
2 -1
3 -1
Name: c, dtype: object
output of pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 2.7.9.final.0
python-bits: 64
OS: Linux
OS-release: 2.6.18-238.9.1.el5
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US
pandas: 0.16.2
nose: 1.3.4
Cython: 0.22
numpy: 1.9.2
scipy: 0.15.1
statsmodels: 0.6.1
IPython: 3.0.0
sphinx: 1.3.1
patsy: 0.3.0
dateutil: 2.4.1
pytz: 2016.3
bottleneck: None
tables: 3.1.1
numexpr: 2.3.1
matplotlib: 1.4.3
openpyxl: 1.8.5
xlrd: 0.9.3
xlwt: 0.7.5
xlsxwriter: 0.6.7
lxml: 3.4.2
bs4: 4.3.2
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 1.0.9
pymysql: None
psycopg2: None