Series.any() and .all() don't return bool values if dtype=object · Issue #12863 · pandas-dev/pandas (original) (raw)
Code Sample, a copy-pastable example if possible
s = pd.Series(index=range(5), data=['a', 'b', 'c', 'd', 'e'], dtype=object)
print [s.any(), s.all()]
Expected Output
[True, True]
Actual output
['a', 'e']
output of pd.show_versions()
INSTALLED VERSIONS
------------------
commit: None
python: 2.7.11.final.0
python-bits: 64
OS: Darwin
OS-release: 15.0.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
pandas: None
nose: 1.3.7
pip: 8.1.1
setuptools: None
Cython: None
numpy: 1.10.1
scipy: 0.16.1
statsmodels: None
IPython: 4.0.0
sphinx: 1.3.3
patsy: None
dateutil: 2.4.2
pytz: 2015.7
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: 1.4.3
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 1.0.11
pymysql: None
psycopg2: None
Jinja2: None