posit-dev / great-tables

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

fmt_percent doesn't work with `polars-u64-idx` #387

Open lostmygithubaccount opened 2 days ago

lostmygithubaccount commented 2 days ago

Prework

Description

I need to use polars-u64-idx to avoid errors. it doesn't seem like I can use this with great_tables currently if using fmt_percent

Reproducible example

import polars as pl
from great_tables import GT

df = pl.DataFrame({"a": [1, 2]})

GT(df).fmt_percent("a", decimals=2)

error:

PackageNotFoundError: No package metadata was found for polars

Expected result

the above works -- it does with regular polars

Development environment

Additional context

Add any other context about the problem here.