From e912b58eeb3dbc8f203d8647d9089d3dd98b18e8 Mon Sep 17 00:00:00 2001 From: Jongsung-Kim Date: Thu, 28 Sep 2017 23:58:27 +0900 Subject: [PATCH] Update traffic_prediction.py transform() argument type is will be list. --- Chapter 03/code/traffic_prediction.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Chapter 03/code/traffic_prediction.py b/Chapter 03/code/traffic_prediction.py index d8646d4..728eba3 100644 --- a/Chapter 03/code/traffic_prediction.py +++ b/Chapter 03/code/traffic_prediction.py @@ -49,7 +49,7 @@ if item.isdigit(): test_datapoint_encoded[i] = int(test_datapoint[i]) else: - test_datapoint_encoded[i] = int(label_encoder[count].transform(test_datapoint[i])) + test_datapoint_encoded[i] = int(label_encoder[count].transform([test_datapoint[i]])) count = count + 1 test_datapoint_encoded = np.array(test_datapoint_encoded)