We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import pandas as pd import numpy as np df = pd.DataFrame({'length': np.random.normal(0, 1, 1000), 'width': np.random.normal(0, 1, 1000), 'a': np.random.randint(0, 2, 1000)}) df.hist(column=['length', 'width'], by='a', figsize=(4, 2))
by-column a plotted along specified columns length and width (link). The full problem is described on this stackoverflow post.
a
length
width
Problem vanishes when by-column is non-numeric (link).
pd.show_versions()
commit : 2cb9652 python : 3.7.10.final.0 python-bits : 64 OS : Linux OS-release : 4.15.0-142-generic Version : #146~16.04.1-Ubuntu SMP Tue Apr 13 09:27:15 UTC 2021 machine : x86_64 processor : x86_64 byteorder : little LC_ALL : None LANG : en_US.UTF-8 LOCALE : en_US.UTF-8
pandas : 1.2.4 numpy : 1.19.2 pytz : 2021.1 dateutil : 2.8.1 pip : 21.1 setuptools : 49.6.0.post20210108 Cython : None pytest : None hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : 4.6.3 html5lib : None pymysql : None psycopg2 : None jinja2 : 2.11.3 IPython : 7.14.0 pandas_datareader: None bs4 : None bottleneck : None fsspec : 2021.04.0 fastparquet : None gcsfs : None matplotlib : 3.3.4 numexpr : None odfpy : None openpyxl : 3.0.5 pandas_gbq : None pyarrow : None pyxlsb : None s3fs : None scipy : 1.6.2 sqlalchemy : 1.4.11 tables : None tabulate : None xarray : None xlrd : 1.2.0 xlwt : None numba : None
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Histogram through pandas.DataFrame.hist
Problem description
by-column
a
plotted along specified columnslength
andwidth
(link). The full problem is described on this stackoverflow post.Expected Output
Problem vanishes when by-column is non-numeric (link).
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : 2cb9652
python : 3.7.10.final.0
python-bits : 64
OS : Linux
OS-release : 4.15.0-142-generic
Version : #146~16.04.1-Ubuntu SMP Tue Apr 13 09:27:15 UTC 2021
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.2.4
numpy : 1.19.2
pytz : 2021.1
dateutil : 2.8.1
pip : 21.1
setuptools : 49.6.0.post20210108
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.6.3
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.3
IPython : 7.14.0
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : 2021.04.0
fastparquet : None
gcsfs : None
matplotlib : 3.3.4
numexpr : None
odfpy : None
openpyxl : 3.0.5
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : 1.6.2
sqlalchemy : 1.4.11
tables : None
tabulate : None
xarray : None
xlrd : 1.2.0
xlwt : None
numba : None
The text was updated successfully, but these errors were encountered: