WSYAM806 commited on
Commit
8f3e174
·
1 Parent(s): a9599a1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -101,7 +101,7 @@ with App:
101
  st.write(input)
102
  if st.button('Cluster'):
103
  num_col = [' income_annum', ' loan_amount', ' loan_term', ' cibil_score', ' residential_assets_value', ' commercial_assets_value', ' luxury_assets_value', ' bank_asset_value']
104
- cluster_data = data.num_col
105
  cluster_df = cluster.fit_transform(cluster_data)
106
  k_3 = KMeans(n_clusters=3)
107
  cluster_df = k_3.predict(cluster_df)
 
101
  st.write(input)
102
  if st.button('Cluster'):
103
  num_col = [' income_annum', ' loan_amount', ' loan_term', ' cibil_score', ' residential_assets_value', ' commercial_assets_value', ' luxury_assets_value', ' bank_asset_value']
104
+ cluster_data = input.drop(columns=[col for col in input.columns if col not in num_col])
105
  cluster_df = cluster.fit_transform(cluster_data)
106
  k_3 = KMeans(n_clusters=3)
107
  cluster_df = k_3.predict(cluster_df)