<jupyter_start><jupyter_text>For Test Data<jupyter_code>#Taking Test Data
testdata = pd.read_csv("E://Jupyter//Kaggle//Housing Prices Competition for Kaggle Learn Users//test.csv")
#Select identified features
X_testdata = testdata[feature_list]
#Handling Null values or missing values in test data using Approach2
my_imputer = SimpleImputer()
imputed_X_train = pd.DataFrame(my_imputer.fit_transform(X_train))
imputed_X_testdata = pd.DataFrame(my_imputer.transform(X_testdata))
imputed_X_testdata.columns = X_testdata.columns
y_predictions = dt.predict(imputed_X_testdata)
output = pd.DataFrame({'Id': testdata.Id,
                       'SalePrice': y_predictions})
output.to_csv('submission1.csv', index=False)
dt.feature_importances_
importances_dt = pd.Series(dt.feature_importances_,index=X_testdata.columns)
sorted_importances_dt = importances_dt.sort_values()
sorted_importances_dt.plot(kind='barh',color='lightgreen')
plt.show()
list1 = []
for col in list_categorical_cols:
    if (X[col].isnull().sum()>0):
        list1.append(col)

list1<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11420612813370473, 'fraction_numerical': 0.005571030640668524, 'mean_word_length': 6.6453900709219855, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '453868', 'license': 'Apache-2.0', 'n_tokens_mistral': 392, 'n_tokens_neox': 382, 'n_words': 62, 'path': 'housingprice/notebooks/BaselineModel.ipynb', 'repo_name': 'nirvana1707/helloworld', 'size': '1077'}