Skip to content

BUG: allow describe() for on boolean-only columns #13891

Closed
@lia-simeone

Description

@lia-simeone

I know I can obtain the expected output by using include=['bool'], but that feels bad to me as a user. I want describe() to know that I'm only asking for boolean columns and not freak out.

Thank you!

Code Sample, a copy-pastable example if possible

>>> test_df = pd.DataFrame({'test_ind_1': [False, False, True, True, False, True , True, False],  'test_ind_2': [False, True, True, False, False, True, True,True]})
>>> test_df.describe()

Expected Output

test_ind_1 test_ind_2count           8          8unique          2          2top          True       Truefreq            4          5

Actual output

ValueError: No objects to concatenate

output of pd.show_versions()

INSTALLED VERSIONS
------------------
commit: None
python: 2.7.12.final.0
python-bits: 64
OS: Linux
OS-release: 3.10.0-327.18.2.el7.x86_64
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8

pandas: 0.18.1
nose: 1.3.7
pip: 8.1.2
setuptools: 23.0.0
Cython: 0.22.1
numpy: 1.11.1
scipy: 0.17.1
statsmodels: 0.6.1
xarray: None
IPython: 5.0.0
sphinx: 1.3.1
patsy: 0.3.0
dateutil: 2.4.1
pytz: 2016.6.1
blosc: None
bottleneck: 1.0.0
tables: 3.2.0
numexpr: 2.4.3
matplotlib: 1.5.1
openpyxl: 1.8.5
xlrd: 0.9.3
xlwt: 1.0.0
xlsxwriter: 0.7.3
lxml: 3.4.4
bs4: 4.3.2
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 1.0.5
pymysql: None
psycopg2: None
jinja2: 2.8
boto: 2.38.0
pandas_datareader: None

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugDtype ConversionsUnexpected or buggy dtype conversionsNumeric OperationsArithmetic, Comparison, and Logical operations

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions