text_plain_output_1.png
import pandas as pd

import statsmodels.api as sm

hrp = pd.read_csv('/kaggle/input/house-rent-prediction-dataset/House_Rent_Dataset.csv')

hrp.dtypes

hrp.shape

hrp.isna()

hrp.isna().sum()

hrp.corr()

X = hrp.BHK
X = sm.add_constant(X)

y = hrp.Rent

slr = sm.OLS(y, X)
model = slr.fit()
model.summary()

model.params

model.summary().tables[1]

model.f_pvalue

model.fvalue

model.conf_int()

model.f_pvalue