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_nanoplot invalid plot_type="bars" does not error, produces no plot #331

Open machow opened 1 month ago

machow commented 1 month ago

fmt_nanoplot can accept plot_type="bar", but if you accidentally pass "bars" then

  1. it does not error
  2. it does not produce any plots

It seems like this should raise an error

import polars as pl

df = pl.DataFrame({"x": [[1, 2, 3], [4, 5]]})
GT(df).fmt_nanoplot("x", plot_type="bars")
image