1. Project columns
select keeps only the named columns, returning a new DataFrame with just name and age.
df.select("name", "age")Typorithm · easy
Step 1 of 8 · intro card
DataFrames
select projects a subset of columns; filter keeps only the rows matching a condition. Build conditions with col("age") expressions, then show() to run the chain.
select narrows a DataFrame to the columns you name, producing a new DataFrame — the original is never modified.
filter keeps only rows where a boolean expression is true; col("age") references a column so col("age") > 18 evaluates per row.
select and filter are lazy transformations: nothing runs until an action like show() triggers the whole chain at once.
select projects a subset of columns.
filter keeps rows matching a condition.
col("name") references a column in expressions.
df.select("name", "age").filter(col("age") > 18).show();Connect each part of the code to the concept before you type.
select keeps only the named columns, returning a new DataFrame with just name and age.
df.select("name", "age")filter keeps only the rows where the boolean column expression is true.
.filter(col("age") > 18)col("age") references the age column so it can be compared inside an expression.
col("age")show() is an action that runs the chained transformations and prints the result.
.show();Read the concept map and follow the code breakdown.
Type the implementation, repair mistakes and work through every recall exercise.
Use the final check without hints; revisit weak concepts in short practice sessions.