BuildlyBuildly
DashboardExercisesProfileHelp
Data Science/Module 2: Data Analytics/Series & DataFrame1/3
Exercise·7 min·10 XP

Build a DataFrame from Lists

Context. You collected student exam scores into two parallel lists and want them in a DataFrame for analysis.

Your task. Write build_scores_df(names, scores) that returns a DataFrame with two columns, name and score, where each row pairs a name with its score (same index).

Example. names=["Alice","Bob"], scores=[85,92] →

namescore
Alice85
Bob92

Notes. Both inputs are always the same length. Empty inputs → empty DataFrame with both columns present.

Previous
Pick Specific Columns
Next
Shape and Column Names