Concept Flow - Forward fill and backward fill
Start with DataFrame with missing values
Choose fill method: forward fill or backward fill
Forward fill
Replace NaN with
previous valid
Return filled DataFrame
The process starts with a DataFrame containing missing values. You choose to fill missing values either by carrying forward the last known value (forward fill) or by using the next known value (backward fill).