import statsmodels.api as sm glm_binom = sm.GLM(data.endog, data.exog, family=sm.families.Binomial())