text_html_output_1.png
from sklearn.ensemble import RandomForestRegressor

import pandas as pd

train_df = pd.read_csv('/kaggle/input/playground-series-s3e1/train.csv')
test_df = pd.read_csv('/kaggle/input/playground-series-s3e1/test.csv')

from sklearn.ensemble import RandomForestRegressor
reg = RandomForestRegressor(random_state=1)

reg.fit(X_train, y_train)

pred = reg.predict(X_val)

prediction = reg.predict(test_df)

submission = pd.DataFrame({'id': test_df.id, 'MedHouseVal': prediction})
submission.head()