Recall & Review
beginner
What is forward fill in data analysis?
Forward fill is a method to fill missing data by copying the last known value forward until a new value appears.
Click to reveal answer
beginner
What does backward fill do in a dataset?
Backward fill fills missing values by copying the next known value backward until a previous value is found.
Click to reveal answer
beginner
How do you perform forward fill on a pandas DataFrame column named 'A'?
Use df['A'].fillna(method='ffill') to fill missing values forward in column 'A'.
Click to reveal answer
intermediate
Why might you choose forward fill over backward fill?
Forward fill is useful when past values logically carry forward, like filling missing sensor readings with the last known measurement.
Click to reveal answer
intermediate
Can forward fill and backward fill be combined? If yes, how?
Yes, you can first apply forward fill to fill missing values, then apply backward fill to fill any remaining missing values at the start of the data.
Click to reveal answer
Which pandas method fills missing values by copying the previous value forward?
✗ Incorrect
fillna(method='ffill') copies the last known value forward to fill missing data.
What does backward fill do with missing data?
✗ Incorrect
Backward fill copies the next known value backward to fill missing data.
If a dataset starts with missing values, which fill method can fill those missing values?
✗ Incorrect
Backward fill can fill missing values at the start by copying the next known value backward.
Which method is best when missing data should be filled with the last known measurement?
✗ Incorrect
Forward fill is best when the last known measurement logically carries forward.
What is the pandas syntax to fill missing values backward in a DataFrame column 'B'?
✗ Incorrect
fillna(method='bfill') fills missing values by copying the next known value backward.
Explain how forward fill and backward fill work to handle missing data in a dataset.
Think about how missing values can be filled using nearby known values in order.
You got /4 concepts.
Describe a real-life example where forward fill would be a better choice than backward fill.
Consider situations where the past value logically continues until updated.
You got /4 concepts.