text_plain_output_1.png
from sklearn.tree import DecisionTreeRegressor

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

data = pd.read_csv('/kaggle/input/30-days-of-ml/train.csv')
data.isna().sum()

y = data.target
features_1 = ['cat0', 'cat1', 'cat2', 'cat3', 'cat4', 'cat5', 'cat6', 'cat7', 'cat8', 'cat9']
features_2 = ['cont0', 'cont1', 'cont2', 'cont3', 'cont4', 'cont5', 'cont6', 'cont7', 'cont8', 'cont9', 'cont10', 'cont11', 'cont12', 'cont13']
features_3 = ['cat0', 'cat1', 'cat2', 'cat3', 'cat4', 'cat5', 'cat6', 'cat7', 'cat8', 'cat9', 'cont0', 'cont1', 'cont2', 'cont3', 'cont4', 'cont5', 'cont6', 'cont7', 'cont8', 'cont9', 'cont10', 'cont11', 'cont12', 'cont13']
X1 = data[features_2]

from sklearn.tree import DecisionTreeRegressor
model = DecisionTreeRegressor(random_state=1)
model.fit(X1, y)

test = pd.read_csv('/kaggle/input/30-days-of-ml/test.csv')
predictions = model.predict(test[features_2])

output = pd.DataFrame({'Id': test.index, 'target': predictions})
output.to_csv('submission.csv', index=False)
print('complete')