def bestfit(self):
	"""
	Returns a series with the bestfit values. 
	
	Example:
		Series.bestfit()

	Returns: series
		The returned series contains a parameter 
		called 'formula' which includes the string representation 
		of the bestfit line. 
	"""
	# statsmodel cannot be included on requirements.txt
	# see https://github.com/scikit-learn/scikit-learn/issues/4164
	# which shares the same issue as statsmodel
	try:
		import statsmodels.api as sm
	except:
		raise Exception("statsmodels is required: " \
						"please run " \
						"pip install statsmodels" )

	x=pd.Series(list(range(1,len(self)+1)),index=self.index)
	x=sm.add_constant(x)
	model=sm.OLS(self,x)
	fit=model.fit()
	vals=fit.params.values
	best_fit=fit.fittedvalues
	# the below methods have been deprecated in Pandas
	# model=pd.ols(x=x,y=self,intercept=True)
	# best_fit=model.y_fitted
	best_fit.formula='%.2f*x+%.2f' % (vals[0],vals[1])
	return best_fit