posit-dev / great-tables

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

Remove pandas dependencies #252

Closed deanm0000 closed 2 months ago

deanm0000 commented 3 months ago

This is a WIP of removing pandas as hard dependency. I started off thinking I just needed to remove it from nanoplots and then I kept looking for more places.

One annoying one, in particular, is the mizani import which itself requires pandas and is only used for a gradient calc. For this draft I just made it a try/except import.

I eventually lost steam on this so it's incomplete. My "workflow" on this is to

  1. build it
  2. install it
  3. uninstall pandas
  4. try to import it
  5. see where it errors for lack of pandas.
  6. make it tolerant of polars and pandas
  7. Rinse and Repeat
machow commented 2 months ago

Hey, thanks for working on this. Like you flagged, taking out pandas ended up needing quite a bit of work across the code base. I've opened a PR to remove it from everything except the data submodule and data_color() (and will open a PR for data_color() next!).

I'm going to close this, in favor of that PR. Thanks again for looking into the issue!

https://github.com/posit-dev/great-tables/pull/261