-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
New issue
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
BUG: last column name is not bold when applying bold font to column names together with hiding index before converting to latex #52218
Comments
take |
Take |
Hi @jgarba, I already assigned this task to myself yesterday. Would it be okay if I assign it back to myself? |
yup I will unassign myself |
take |
Panda version 2.0.3 Hi, I was facing the same issue, applying background and font color to LaTeX table headers. the issue is when we call hide(axis=0) i added the below just after I manage to get the header color with or without hide(axis=0) works fine. |
+1 for this bug! Came across this today |
+1 for this, still happening on 2.2.3 |
@rhshadrach If I submit a PR with the fix above from @joveyee, will you merge it? |
* fix to_latex for multiindex * add newline * fix styling * Update v2.3.0.rst fix backticks * update description. * Apply suggested fix Co-authored-by: JHM Darbyshire <[email protected]> * move to v.3 * Update pandas/io/formats/style_render.py Co-authored-by: Matthew Roeschke <[email protected]> * spacing * fix whitespace * fix method name --------- Co-authored-by: JHM Darbyshire <[email protected]> Co-authored-by: Matthew Roeschke <[email protected]>
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
I am trying to convert pandas dataframe to latex with column names in bold font at the sam time , with the code above, which results in:
where the last column name is not in bold font.
Expected Behavior
If I do not hide index with:
the result will be:
where the last column name is in bold font.
Installed Versions
INSTALLED VERSIONS
commit : 2e218d1
python : 3.8.13.final.0
python-bits : 64
OS : Linux
OS-release : 5.15.0-53-generic
Version : #59~20.04.1-Ubuntu SMP Thu Oct 20 15:10:22 UTC 2022
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : zh_CN.UTF-8
LOCALE : zh_CN.UTF-8
pandas : 1.5.3
numpy : 1.21.5
pytz : 2022.1
dateutil : 2.8.2
setuptools : 58.0.4
pip : 21.2.4
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.6.5
html5lib : 1.1
pymysql : None
psycopg2 : None
jinja2 : 3.1.2
IPython : 8.6.0
pandas_datareader: None
bs4 : 4.10.0
bottleneck : None
brotli : None
fastparquet : None
fsspec : None
gcsfs : None
matplotlib : 3.5.1
numba : 0.55.1
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : 1.8.0
snappy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
zstandard : None
tzdata : 2022.7
The text was updated successfully, but these errors were encountered: