✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🐇 Announcing Dash VTK for 3d simulation graphics. Check out the March webinar.

Plot a derivative of a set of (x,y) points from .csv file


In the example given in the plot.ly website they use a well known function (sin):
x = np.linspace(0, 2*np.pi, 100)
y = np.sin(x)

dy = np.zeros(y.shape,np.float)
dy[0:-1] = np.diff(y)/np.diff(x)
dy[-1] = (y[-1] - y[-2])/(x[-1] - x[-2])

I would to know how to do the same but with a set of points on the Cartesian plane with a known dx.

Thanks alot.

Probably best for #api:python