The Pandas library will give you the tools to fill the NaN values.
One of its methods, DataFrame.interpolate() can be used to interpolate NaN values.
Interpolation is a way to estimate the values in between two known values.
Here the blue line gives an interpolation in between red dots.
Or so it estimates what can of value it could potentially be.
DataFrame.interpolate() can receive few arguments, but the most important for us today is the method argument.
The method argument will specify what kind of method we want to use, as shown in the two graphs above.
It can accept wide range of methods shown in the following :
Here you are ! You now know how to interpolate values using pandas interpolate method.