We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
http://stackoverflow.com/questions/10484424/possible-bug-in-series-interpolate
x1 = np.array([0, 0.25, 0.77, 1.2, 1.4, 2.6, 3.1]) y1 = np.array([0, 1.1, 0.5, 1.5, 1.2, 2.1, 2.4]) x2 = np.array([0, 0.25, 0.66, 1.0, 1.2, 1.4, 3.1]) y2 = np.array([0, 0.2, 0.8, 1.1, 2.2, 0.1, 2.4]) df1 = DataFrame(data=y1, index=x1, columns=['A']) df1.plot(marker='o') df2 = DataFrame(data=y2, index=x2, columns=['A']) df2.plot(marker='o') df3=df1 - df2 df3.plot(marker='o') print df3 def resample(signals): aligned_x_vals = reduce(lambda s1, s2: s1.index.union(s2.index), signals) return map(lambda s: s.reindex(aligned_x_vals).apply(Series.interpolate), signals) sig1, sig2 = resample([df1, df2]) sig3 = sig1 - sig2 plt.plot(df1.index, df1.values, marker='D') plt.plot(sig1.index, sig1.values, marker='o') plt.grid() plt.figure() plt.plot(df2.index, df2.values, marker='o') plt.plot(sig2.index ,sig2.values, marker='o') plt.grid()
The text was updated successfully, but these errors were encountered:
closing due to #1206
Sorry, something went wrong.
No branches or pull requests
http://stackoverflow.com/questions/10484424/possible-bug-in-series-interpolate
The text was updated successfully, but these errors were encountered: