text_plain_output_1.png
import numpy as np

import pandas as pd

import seaborn as sns

import statsmodels.api as sm

df = pd.read_csv('/kaggle/input/personal-loan-modeling/Bank_Personal_Loan_Modelling.csv')

df.columns

model = sm.OLS.from_formula('Income ~ CCAvg', data=df)
inc_ccavg = model.fit()
inc_ccavg.summary()

model = sm.OLS.from_formula('Income ~ Mortgage', data=df)
inc_ccavg = model.fit()
inc_ccavg.summary()