change fillna to dropna
This commit is contained in:
parent
84a8fb17e2
commit
754e8dfb4f
@ -43,7 +43,7 @@ def is_finished(old_medoids, new_medoids):
|
|||||||
|
|
||||||
def kmedoids(num_samples, num_clusters):
|
def kmedoids(num_samples, num_clusters):
|
||||||
df = pd.read_csv('CC GENERAL.csv', index_col='CUST_ID')
|
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))
|
df_scaled = pd.DataFrame(StandardScaler().fit_transform(df))
|
||||||
|
|
||||||
# initialize medoids (at random)
|
# initialize medoids (at random)
|
||||||
|
Loading…
Reference in New Issue
Block a user