Skip to content

Dataframe generated in Jupyter notebook overlapping rander #1338

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

Closed
Venkat-Rajgopal opened this issue May 26, 2023 · 5 comments · Fixed by #1482
Closed

Dataframe generated in Jupyter notebook overlapping rander #1338

Venkat-Rajgopal opened this issue May 26, 2023 · 5 comments · Fixed by #1482
Labels
needs: more information Needs more information from the author before we can move forward

Comments

@Venkat-Rajgopal
Copy link

I have some code illustrations written in Jupyter notebook. Some parts of the notebook does not render correctly for eg this data frame here is overlapping.
image

It only renders when I use a print for the DataFrame.

Below are the configurations with pydata_sphinx_theme I am using.

[tool.poetry.group.docs.dependencies]
sphinx = ">5"
myst-parser = "1.0.0"
sphinx-autobuild = "^2021.3.14"
sphinxcontrib-mermaid = "0.8.1"
nbsphinx = "^0.8.12"
sphinx-autodoc2 = "^0.4.2"
pydata-sphinx-theme = "^0.13.3"
jupyter-sphinx = "^0.4.0"
sphinx-togglebutton = "^0.3.2"
sphinx-favicon = "^1.0.1"
sphinx-remove-toctrees = "^0.0.3"
sphinx-copybutton = "^0.5.2"
pandoc = "^2.3"

Extensions enabled in conf.py

extensions = ["myst_parser",
              "sphinx.ext.duration",
              "sphinx.ext.autosectionlabel",
              "sphinx.ext.autodoc",
              "sphinx.ext.napoleon",
              "sphinx.ext.coverage",
              "sphinx.ext.autosummary",
              "sphinx_copybutton",
              "nbsphinx",
              "autodoc2",
              "sphinxcontrib.mermaid",
              "matplotlib.sphinxext.plot_directive",
              "jupyter_sphinx",
              "sphinx_togglebutton",
              "sphinx_favicon",
              "sphinx_remove_toctrees"
              ]

Any pointers what could be the issue here ? Thanks for looking into this.

@12rambau
Copy link
Collaborator

This error has already been raised before and it's related to the way cells are rendered in the html build. Can you use myst-nb instead of nbsphinx and let us know if the bug remains ?

@12rambau 12rambau added the needs: more information Needs more information from the author before we can move forward label May 30, 2023
@dopplershift
Copy link

@12rambau We're seeing this behavior with sphinx-gallery, is there a known solution for that?

@trallard
Copy link
Collaborator

@dopplershift or @Venkat-Rajgopal do you have a link to a live-site or rendered HTML docs where I could see this? It would be useful to see the actual behaviour and think about how this could/should be solved

@rhshadrach
Copy link

This was handled in pandas by overriding the width: fit-content attribute. See pandas-dev/pandas#48644.

@Venkat-Rajgopal
Copy link
Author

Thank you for the fix. Can confirm that this is fixed now. 👍🏽

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: more information Needs more information from the author before we can move forward
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants