Linear interpolation of a column to gapfill


I am trying to gapfill the data of a column(X) of a dataframe df. I want to use linear interpolation.


I recommend that if you made any progress at all, you share the code that you produced for this task. Also provide some small amount of representative data on which to run it.