posit-dev / great-tables

Make awesome display tables using Python.
https://posit-dev.github.io/great-tables/
MIT License
1.9k stars 72 forks source link

docs: add a preview section for the built-in datasets #453

Closed jrycw closed 1 month ago

jrycw commented 2 months ago

I’d like to propose adding a preview section to allow users to quickly glance at the built-in datasets. I believe this would help users choose the appropriate dataset for exploring the table.

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 86.74%. Comparing base (fedac08) to head (20fa355). Report is 147 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #453 +/- ## ========================================== - Coverage 86.75% 86.74% -0.01% ========================================== Files 42 42 Lines 4702 4706 +4 ========================================== + Hits 4079 4082 +3 - Misses 623 624 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

machow commented 2 months ago

I wonder if something like polars.DataFrame.glimpse could be useful here? I realize these are pandas DataFrames, but glimpse scales so nicely width number of columns 😭

jrycw commented 2 months ago

Thanks for sharing this—it’s new to me.

I like how it uses the row to display information more concisely. I’m fine with either option :).

jrycw commented 2 months ago

I've pushed another commit using polars.DataFrame.glimpse, and it looks promising—I’m leaning toward this option.

Would it be possible to generate preview sites for both options?

My only concern is that the preview includes Polars-specific data types, which might be a small hurdle for users more familiar with Pandas.

jrycw commented 1 month ago

@rich-iannone and @machow, have we reached a consensus on which format to use for the preview section yet?

machow commented 1 month ago

From pairing w/ Rich -- the glimpse approach looks great, thanks for taking the time to explore different approaches here!