import pandas as pd
df = pd.read_csv('Math2B_grades_clean.csv')
Run to view results
df_sub = df[(df['Total'] == 'F') & (df['Midterm 2'] > 72)]
print(df_sub)
Run to view results
import altair as alt
scatter_plot = alt.Chart(df_sub).mark_circle().encode(
x='Midterm 2',
y='Final exam',
).properties(
width=600,
height=400
)
scatter_plot
Run to view results
# Should have 6 rows because there are 6 students.
len(df_sub)
Run to view results
scatter_plot = alt.Chart(df_sub).mark_point(filled=True).encode(
x='Midterm 2',
y='Final exam',
color='Quiz 4:N',
size='Quiz 4'
).properties(
width=600,
height=400
)
scatter_plot
Run to view results
quiz4_min_student_id = df_sub.set_index('Student_id')['Quiz 4'].idxmin()
Run to view results
scatter_plot = alt.Chart(df).mark_circle().encode(
x='Midterm 2',
y='Final exam',
color='Total:N',
size='Quiz 4'
).properties(
width=600,
height=400
)
scatter_plot
Run to view results