text_plain_output_1.png
from sklearn.cluster import KMeans

import pandas as pd

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

workdir = '../input/'
basins_data = pd.read_csv(workdir + 'BasinCharacteristics.csv')

features_cols = basins_data.columns[1:4]
target_col = basins_data.columns[0]
X = basins_data[features_cols]
y = basins_data[target_col]

y_pred = KMeans(n_clusters=4).fit_predict(X)
y_pred