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

[FEAT] Visualization cleanup (1/n): Use Table for repr #1011

Merged
merged 7 commits into from
Jun 7, 2023

Conversation

xcharleslin
Copy link
Contributor

@xcharleslin xcharleslin commented Jun 7, 2023

This PR has DataFrame repr call into Table repr and removes the existing DataFrame specific codepath.

For now, we also deprecate the table sizing options (height and width). It will be fixed to a max of 1x20. (heads up @jaychia)

Also:

  • fixs off-by-one error in Table repr
  • adds length truncation in Table repr
  • have PySchema repr call down to Rust Schema repr

This PR:

  • DataFrame repr uses Table repr

Future PRs:

  • Add default html_value method to Series
  • Special implementation of html_value for images
  • Manually implement html_repr for Table
  • DataFrame repr calls Table html_repr

@xcharleslin xcharleslin requested a review from jaychia June 7, 2023 02:21
@xcharleslin xcharleslin marked this pull request as ready for review June 7, 2023 02:21
@xcharleslin xcharleslin enabled auto-merge (squash) June 7, 2023 02:21
@codecov
Copy link

codecov bot commented Jun 7, 2023

Codecov Report

Merging #1011 (aa6a6b6) into main (a54c534) will increase coverage by 0.21%.
The diff coverage is 73.33%.

❗ Current head aa6a6b6 differs from pull request most recent head 56c37de. Consider uploading reports for the commit 56c37de to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1011      +/-   ##
==========================================
+ Coverage   85.14%   85.35%   +0.21%     
==========================================
  Files         184      184              
  Lines       16032    16047      +15     
==========================================
+ Hits        13650    13697      +47     
+ Misses       2382     2350      -32     
Impacted Files Coverage Δ
daft/viz/repr.py 82.22% <ø> (-1.65%) ⬇️
src/table/mod.rs 90.27% <55.55%> (+7.93%) ⬆️
daft/logical/schema.py 93.58% <100.00%> (ø)
daft/viz/dataframe_display.py 92.10% <100.00%> (+1.48%) ⬆️
src/array/ops/take.rs 65.33% <100.00%> (ø)
src/python/schema.rs 85.96% <100.00%> (+0.77%) ⬆️
src/series/mod.rs 87.93% <100.00%> (+0.89%) ⬆️

... and 4 files with indirect coverage changes

@xcharleslin xcharleslin merged commit 122b8ed into main Jun 7, 2023
@xcharleslin xcharleslin deleted the charles/tableviz branch June 7, 2023 04:39
@jaychia jaychia changed the title Visualization cleanup (1/n): Use Table for repr [FEAT] Visualization cleanup (1/n): Use Table for repr Jun 14, 2023
@jaychia jaychia added the enhancement New feature or request label Jun 14, 2023
@jaychia jaychia mentioned this pull request Jul 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants