Is there a way in pandas to interpolate only single missing data points? That is, if there is 2+ consecutive NaN\'s, I\'d like to leave them alone.
so, as an example:>
s[(s.shift(-1).notnull()) & (s.shift(1).notnull())] = (s.shift(-1) + s.shift(1))/2
Actually,
s[s.isnull()] = (s.shift(-1) + s.shift(1))/2
works as well, if you are doing simple interpolation.