statsmodels.regression.linear_model.OLS.from_formula
classmethod OLS.from_formula(formula, data, subset=None, *args, **kwargs)
Create a Model from a formula and dataframe. Parameters:
formula : str or generic Formula object The formula specifying the model data : array-like The data for the model. See Notes. subset : array-like An array-like object of booleans, integers, or index values that indicate the subset of df to use in the model. Assumes df is a pandas.DataFrame args : extra a