The following codes were tested under Julia v1.6.1 and DataFrames v1.2.0.

I saw this question on Stack Overflow: What’s an efficient way to fill missing values with previous non-missing value? .

I’ll answer in the following.

The following answer is entirely based on the discussions in this thread: Julia DataFrame Fill NA with …