title: Monotonically decreasing curve fit using Python
body: <p>I have a set of data points as shown in the figure.
  <img src="https://i.stack.imgur.com/x70M2.png" alt="enter image description here"></p>
  
  <p>I need to fit a curve to these points such that the curve is monotonically decreasing. There is no specified functional form for the curve. I am experimenting with curve fitting for the first time and in general, I wanted to know how to proceed with being able to choose certain functions, fit them and compare their fit to choose the best.</p>
  
  <p>I believe that for a monotonically decreasing curve,a constraint would be that the first derivative is negative. I was looking at the scipy.curve_fit and scipy.interpolate.UnivariateSpline functions but they don't seem to have the option for a constrained fit. What would be the best function to use in such a case? Thanks.</p>