Skip to content
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

DataFrame.column_widths interferes with pinned_columns, causing only the first column to be pinned #10584

Open
1 task done
shikhar1729 opened this issue Feb 13, 2025 · 1 comment
Assignees
Labels
bug Something isn't working 💾 Dataframe

Comments

@shikhar1729
Copy link

shikhar1729 commented Feb 13, 2025

Describe the bug

When using gr.DataFrame with both pinned_columns and a custom column_widths list, only the first column stays pinned. Additional columns that should also be pinned remain unpinned. Removing column_widths fixes the problem, and multiple columns become pinned as intended

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

  • Create a gr.DataFrame with pinned_columns=2 (to freeze the first two columns) and also provide a column_widths list

  • Launch the app, then scroll horizontally if needed.

Expected behavior: Both the first and second columns remain pinned/frozen on the left side when scrolling.

Actual behavior: Only the first column remains pinned on horizontal scroll. The second column scrolls normally and does not stay pinned.

Screenshot

Please refer to this : embeddings-benchmark/mteb#2044 (comment)

System Info

Gradio Environment Information:
------------------------------
Operating System: Darwin
gradio version: 5.16.0
gradio_client version: 1.7.0

------------------------------------------------
gradio dependencies in your environment:

aiofiles: 23.2.1
anyio: 4.8.0
audioop-lts: 0.2.1
fastapi: 0.115.8
ffmpy: 0.5.0
gradio-client==1.7.0 is not installed.
httpx: 0.28.1
huggingface-hub: 0.28.1
jinja2: 3.1.5
markupsafe: 2.1.5
numpy: 2.2.2
orjson: 3.10.15
packaging: 24.2
pandas: 2.2.3
pillow: 11.1.0
pydantic: 2.10.6
pydub: 0.25.1
python-multipart: 0.0.20
pyyaml: 6.0.2
ruff: 0.9.6
safehttpx: 0.1.6
semantic-version: 2.10.0
starlette: 0.45.3
tomlkit: 0.13.2
typer: 0.15.1
typing-extensions: 4.12.2
urllib3: 2.3.0
uvicorn: 0.34.0
authlib; extra == 'oauth' is not installed.
itsdangerous; extra == 'oauth' is not installed.


gradio_client dependencies in your environment:

fsspec: 2024.6.1
httpx: 0.28.1
huggingface-hub: 0.28.1
packaging: 24.2
typing-extensions: 4.12.2
websockets: 14.2


(myenv) venvsshiroma

Severity

I can work around it

@abidlabs
Copy link
Member

cc @hannahblair for visibility

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 💾 Dataframe
Projects
None yet
Development

No branches or pull requests

3 participants