TEXT_COLUMNS = {{ columns }}
temp_test_data = {{ test_dataset }}[TEXT_COLUMNS]
# Make the entire dataframe sparse to avoid it converting into a dense matrix.
{{ test_dataset }} = {{ test_dataset }}.drop(TEXT_COLUMNS, axis=1).astype(pd.SparseDtype('float64', 0))
with open('tfidfVectorizer.pkl', 'rb') as f:
    vectorizers = pickle.load(f)
for _col in TEXT_COLUMNS:
    tfidfvectorizer = vectorizers[_col]
    feature_names = ['_'.join([_col, name]) for name in tfidfvectorizer.get_feature_names_out()]
    vector_test = tfidfvectorizer.transform(temp_test_data[_col])
    vector_test = pd.DataFrame.sparse.from_spmatrix(vector_test, columns=feature_names, index=temp_test_data.index)
    {{ test_dataset }} = pd.concat([{{ test_dataset }}, vector_test], axis=1)
