Altair allows you to transform data directly within the chart definition, such as calculating averages or sums, using mean , sum , count , etc..
Choose the chart type (e.g., mark_point() , mark_bar() , mark_line() ). altair
Altair works best with tidy data—long-form data where each row is an observation and each column is a variable. Altair allows you to transform data directly within