title: Nonlinear regression with python - what's a simple method to fit this data better?
body: <p>I have some data that I want to fit so I can make some estimations for the value of a physical parameter given a certain temperature.</p>
  
  <p>I used numpy.polyfit for a quadratic model, but the fit isn't quite as nice as I'd like it to be and I don't have much experience with regression. </p>
  
  <p>I have included the scatter plot and the model provided by numpy: 
  <a href="https://i.stack.imgur.com/PaCO3.png" rel="noreferrer">S vs Temperature; blue dots are experimental data, black line is the model</a></p>
  
  <p>The x axis is temperature (in C) and the y axis is the parameter, which we'll call S. This is experimental data, but in theory S should tends towards 0 as temperature increases and reach 1 as temperature decreases.</p>
  
  <p>My question is: How can I fit this data better? What libraries should I use, what kind of function might approximate this data better than a polynomial, etc?</p>
  
  <p>I can provide code, coefficients of the polynomial, etc, if it's helpful.</p>
  
  <p><a href="https://www.dropbox.com/s/w8n98fzjnp19uef/8cb_datapoints_T_vs_S.csv?dl=0" rel="noreferrer">Here is a Dropbox link to my data.</a> (Somewhat important note to avoid confusion, although it won't change the actual regression, the temperature column in this data set is Tc - T, where Tc is the transition temperature (40C). I converted this using pandas into T by calculating 40 - x).</p>