Skip to content
Advertisement

Resampling with Pandas spline gives strange results. Do I misunderstand, even though the time matches?

I take my dataframe, which is in seconds, and resample it over a period of every n seconds, to properly align all values with even spacing.

The seconds are parsed correctly, but the output results are strange, so maybe I’m completely misunderstanding what exactly is being splined over?

JavaScript

Gives

JavaScript

So where did my values go in the output?

Advertisement

Answer

When you resample, you lose a lot of data that does not fit the 2s timestep. Therefore, you can’t use it for the interpolation.

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement