Pandas version checks

  • [X] I have checked that the issue still exists on the latest versions of the docs on main here

Location of the documentation

https://pandas.pydata.org/pandas-docs/version/1.5.0/user_guide/style.html#Sticky-Headers

Documentation problem

Here is how the DataFrame looks in v1.5.0 documentation: Pandas DOC: Sticky Headers in Table Visualization is broken in v1.5.0

Here is how it looked in v1.4.4 documentation: Pandas DOC: Sticky Headers in Table Visualization is broken in v1.5.0

I'm using Firefox 104

Suggested fix for documentation

It seems that pydata-sphinx-theme.css is applying width: fit-content; to all tables. This should be overridden for this wide table.

This seems to be related to #48285

Comment From: WooilKim

Let me handle this.

Comment From: WooilKim

take

Comment From: WooilKim

I have a question. Where can I find the document file in the repository? I can not find it in docs directory. Thanks.

Comment From: attack68

pandas/docs/source/user_guide/style.ipynb

Comment From: attack68

It seems like the whole notebook is mishandled, not just set_sticky.

Comment From: WooilKim

@attack68 Thanks. I agree.

Comment From: WooilKim

@attack68 I'm in hard time finding the css "fit-content". I think it is not in the style.ipynb file. Can you give me an advice which file should I look into? Thanks.

Comment From: attack68

FWIW I have detected that if one removes the width: fit-content; CSS attribute value pair from the default pydata-sphinx-theme.css then this page all works as previously. The previous 1.4.x pydata-sphinx-theme.css did not seem to have this width value set.

Screenshot 2022-11-20 at 15 21 58

An alternative solution to avoid tampering with the global pydata-sphinx-theme might be to try to encode an overwrite specifically on the userguide ipynb page. But I don't know how to do either of these at present