Check out example codes for "how to get all elements of column in pandas dataframe". It will help you in understanding the concepts better.

Code Example 1

unique_arr = df["cluster"].unique()

Code Example 2

arr = df["cluster"].to_numpy()

Learn ReactJs, React Native from akashmittal.com