how to have numpyt polyfit use error bars code example
Example: python polyfit with errors
numpy.polynomial.polynomial.polyfit(x, y, deg, rcond=None, full=False, w=weights)
numpy.polynomial.polynomial.polyfit(x, y, deg, rcond=None, full=False, w=weights)