#Step 1: Import required modules from sklearn import datasets import pandas as pd from sklearn.cluster import KMeans #Step 2: Load wine Data and understand it rw = datasets.load_wine() X = rw.data X.shape y= rw.target y.shape rw.target_names # Note : refer …