From 754e8dfb4f52d892ac92e4d25d63e90080699efc Mon Sep 17 00:00:00 2001 From: jakubknczny Date: Fri, 25 Jun 2021 20:35:54 +0200 Subject: [PATCH] change fillna to dropna --- kMedoids.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kMedoids.py b/kMedoids.py index 38227b3..5e3b3d6 100644 --- a/kMedoids.py +++ b/kMedoids.py @@ -43,7 +43,7 @@ def is_finished(old_medoids, new_medoids): def kmedoids(num_samples, num_clusters): df = pd.read_csv('CC GENERAL.csv', index_col='CUST_ID') - df = df[:num_samples].fillna(0) + df = df[:num_samples].dropna() df_scaled = pd.DataFrame(StandardScaler().fit_transform(df)) # initialize medoids (at random)