You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating an area chart from a polars dataframe with a categorical datatype a ValueError is thrown. This works fine if using mark_line instead of mark_area or if one converts the polars df to a pandas df (even though pandas still uses a categorical datatype).
Thanks for the report. Yeah, VegaFusion's Rust core doesn't support categorical columns at the moment (See also #86). When going through pandas these, are automatically expanded into strings, but that logic is bypassed with working with polars. Ideally we'd support categorical's throughout, but at the very least we could move the categorical to string expansion logic into the Rust core (or apply it in Python for the polars case).
Do you know if there a reason that the Rust core appears to not have an issue with processing the categorical data when making a chart with mark_line (or bar/point) but does with mark_area? Does the area chart require it to do some extra processing that it doesn't need to do with the line chart?
Does the area chart require it to do some extra processing that it doesn't need to do with the line chart?
Yeah, area charts in Altair usually generate different data transformations than line charts. In particular the calculation for stacking areas (Vega stack transforms), and for filling in missing values so that stacking is possible (impute transform).
When creating an area chart from a polars dataframe with a categorical datatype a ValueError is thrown. This works fine if using
mark_line
instead ofmark_area
or if one converts the polars df to a pandas df (even though pandas still uses a categorical datatype).The text was updated successfully, but these errors were encountered: