Skip to content

Conversation

@Light2Dark
Copy link
Contributor

📝 Summary

Fixes #2902 . Pass a show_data_types param in mo.ui.table() to control display of dtypes.

CleanShot 2025-07-19 at 10 15 10@2x

If we are not keen to add another param, we could make this a global config instead.

🔍 Description of Changes

📋 Checklist

  • I have read the contributor guidelines.
  • For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on Discord, or the community discussions (Please provide a link if applicable).
  • I have added tests for the changes made.
  • I have run the code and verified that it works as expected.

@Light2Dark Light2Dark requested a review from manzt as a code owner July 19, 2025 02:15
@vercel
Copy link

vercel bot commented Jul 19, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marimo-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 21, 2025 5:07pm

@Light2Dark Light2Dark requested review from mscolnick and removed request for manzt July 19, 2025 02:16
@Light2Dark Light2Dark added the enhancement New feature or request label Jul 19, 2025
@Light2Dark Light2Dark changed the title fix: send param to show dtypes in table header improvement: add param to show dtypes in table header Jul 19, 2025
Copy link
Contributor

@manzt manzt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I see the dypes in the example screenshot. Is it showing the dtypes disabled? Personally, rather than having some config I'd be open to be more opinionated and just always showing the dtype, is there a case where we wouldn't want to show it?

@Light2Dark
Copy link
Contributor Author

Light2Dark commented Jul 20, 2025

Yeah, by default it is shown. There have been requests to hide it like #2902 .

Default:
CleanShot 2025-07-20 at 11 43 31@2x

With show_data_types=False,
CleanShot 2025-07-20 at 11 50 06@2x

@manzt
Copy link
Contributor

manzt commented Jul 20, 2025

Ah I see, I forgot the app/presentation use case. I'd argue that dtypes are necessary in edit mode to understand what your datatypes are.

@Light2Dark
Copy link
Contributor Author

We could also hide it in app mode and not expose this as a parameter. But that will be a change in current behaviour, instead of making it opt-in.

mscolnick
mscolnick previously approved these changes Jul 21, 2025
@mscolnick
Copy link
Contributor

i think configurable is ok since its been requested a few times on Discord as well.

@mscolnick mscolnick merged commit 62f4e78 into main Jul 23, 2025
26 of 38 checks passed
@mscolnick mscolnick deleted the sham/table-fixes branch July 23, 2025 12:47
@github-actions
Copy link

🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.14.13-dev18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request merge when ready

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Let user hide datatype in tables headers

4 participants