Default = pd.read_csv(
    'https://d1pqsl2386xqi9.cloudfront.net/notebooks/Default.csv', index_col=0)
Default['default'] = Default['default'].map({'No': 0, 'Yes': 1})
Default['student'] = Default['student'].map({'No': 0, 'Yes': 1})
y, X = dmatrices('default ~ balance+income+C(student)', Default,
    return_type='dataframe')
y = np.ravel(y)
model = LogisticRegression(C=1000000.0, fit_intercept=False, solver=
    'newton-cg', max_iter=10000000)
model = model.fit(X, y)
pd.DataFrame(zip(X.columns, np.transpose(model.coef_)))
Comparison of R, statmodels, sklearn for a classification task with logistic regression