An assistant produced this code for "show average trip duration by station and month":
import altair as alt
trips = pd.read_csv("trips.csv") # 180,000 rows
alt.data_transformers.disable_max_rows()
chart = alt.Chart(trips).mark_line().encode(
x="start_station",
y="average(duration)",
color="month",
).properties(width=1600).interactive()
chart.save("chart.html")
Find the problems (correctness, performance, design, robustness) and rewrite it.