Plot
Plotly
import polars as pl
import plotly.express as px
import os
def transform():
# example data
df = pl.DataFrame({
"Category": ["Group A", "Group B", "Group C", "Group D"],
"Value": [45, 72, 38, 91]
})
# Generate the bar chart using Plotly
fig = px.bar(df.to_pandas(), x="Category", y="Value", title="Simple Bar Chart")
# Save the chart as HTML
fig.write_html(f"{os.environ['ARTIFACT_FOLDER']}/index.html")
return df
Last updated