title: How to find the gradient of grid-less data in python?
body: <p>I have a pandas data frame containing location data (x_m and y_m) and another variable represented by the color bar in the figure. </p>
  
  <p><a href="https://i.stack.imgur.com/un3WI.png" rel="nofollow noreferrer">Sample figure showing the data points and a possible gradient arrow</a></p>
  
  <p>How can I obtain the average gradient of all of the data points in my data set? I drew one of the possible solutions showing the gradient vector.</p>
  
  <p>Thank you!</p>
  
  <p>EDIT:</p>
  
  <p>I ended up using scipy.interpolate.griddata, similar to what was done here: <a href="https://earthscience.stackexchange.com/questions/12057/how-to-interpolate-scattered-data-to-a-regular-grid-in-python">https://earthscience.stackexchange.com/questions/12057/how-to-interpolate-scattered-data-to-a-regular-grid-in-python</a></p>