From 0d40080f6cdd1b5a47e70377b0317493d660081f Mon Sep 17 00:00:00 2001 From: Andy Eschbacher Date: Tue, 15 Nov 2016 12:02:42 +0100 Subject: [PATCH] move back to colnames --- src/py/crankshaft/crankshaft/clustering/kmeans.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/py/crankshaft/crankshaft/clustering/kmeans.py b/src/py/crankshaft/crankshaft/clustering/kmeans.py index e4fc7e5..383584e 100644 --- a/src/py/crankshaft/crankshaft/clustering/kmeans.py +++ b/src/py/crankshaft/crankshaft/clustering/kmeans.py @@ -92,9 +92,7 @@ def _extract_columns(db_resp, id_col_name): id_col_name (string): name of column which has the row id (not a feature of the analysis) """ - keys = [k for k in db_resp[0].keys()] - - return np.array([db_resp[0][c] for c in keys + return np.array([db_resp[0][c] for c in db_resp.colnames() if c != id_col_name], dtype=float).T