# Explain forward filling and backward filling (data filling)

Can I understand in this way? Let me know if any statement is wrong or not accurate.

1. Reason of data filling:

Assume I have a consecutive data (e.g., daily log data), and partial data are missing. In order to make some calculation (e.g., mean value), we first need to assign values to the missing parts (e.g., equal to existing data)

2. Forward filling and backward filling are two data filling methods.

The difference is the filling direction? E.g., Tuesday data (missing) equals to Monday data (existing) is forward filling. The opposite is backward filling.

• Yep, your understanding is correct. Commented Aug 19, 2019 at 7:05

Yes you are correct. Forward filling and backward filling are two approaches to fill missing values. Forward filling means fill missing values with previous data. Backward filling means fill missing values with next data point.

You can refer the below url for more on missing values:

https://www.kaggle.com/juejuewang/handle-missing-values-in-time-series-for-beginners

https://www.kaggle.com/dansbecker/handling-missing-values

https://www.kaggle.com/meikegw/filling-up-missing-values

These kinds of data filling methods are widely used in time series ml problems. You can refer this url to see how winner in competition use these methods to process na values. https://www.kaggle.com/competitions/g-research-crypto-forecasting/discussion/323703