You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't see the problem here:
On latest master the colspan attribute is added where colspan is greater than 1.
Isn't this what you think it should be doing?
Hi. Thanks for taking the time to look at this bug. The colspan is indeed added but should contain "" around the number as is detailed in the w3schools link. The colspan=2 should be colspan="2".
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
Problem description
The render() of the styler produces incorrect html in case the columns are a MultiIndex.
Expected Output
re.sub(r'colspan=(\d)', r'colspan="\1"', df.style.format('{:,.2f}').render())
The current implementation returns something like
while it should beSee also https://www.w3schools.com/tags/att_td_colspan.asp
Same goes for MultiIndex indices where it concerns rowspan instead of colspan.
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : d9fff27
python : 3.6.5.final.0
python-bits : 64
OS : Linux
OS-release : 4.14.111-1.el7.centos.x86_64
Version : #1 SMP Wed Apr 17 17:45:41 CEST 2019
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.1.0
numpy : 1.19.1
pytz : 2020.1
dateutil : 2.8.1
pip : 9.0.1
setuptools : 28.8.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : 2.8.5 (dt dec pq3 ext lo64)
jinja2 : 2.11.2
IPython : 7.14.0
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.3.0
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 1.0.0
pytables : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
The text was updated successfully, but these errors were encountered: