KnowledgeBoat Logo
|

Informatics Practices

How do you fill all missing values with previous non-missing values?

Python Data Handling

4 Likes

Answer

To fill all missing values in a pandas DataFrame with the previous non-missing values, we can use the fillna method with the ffill parameter. The syntax is df.fillna(method = 'ffill', inplace = True)

Answered By

2 Likes


Related Questions