From d817ede74de6bc53f6bdcf01024220a7b34ec553 Mon Sep 17 00:00:00 2001 From: Jerzy Kwiatkowski Date: Thu, 22 Jun 2023 17:33:26 +0200 Subject: [PATCH] Zaktualizuj 'main.py' --- main.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 1628f00..ad4da08 100644 --- a/main.py +++ b/main.py @@ -25,6 +25,9 @@ classifier = RandomForestClassifier() classifier.fit(X_train, y_transformed) y_pred = classifier.predict(X_test) -for i, prediction in enumerate(y_pred): - print(data_test.iloc[i, 0] + ": ") - print(prediction) \ No newline at end of file +# for i, prediction in enumerate(y_pred): +# print(data_test.iloc[i, 0] + ": ") +# print(prediction) + +data_test['8'] = list(y_pred) +data_test.to_csv('nazwa_pliku.dat', sep=' ', index=False) \ No newline at end of file