Python tools to best fit data