I have 4 list groups, and now I want to assign each list with 4…

Question Answered step-by-step I have 4 list groups, and now I want to assign each list with 4… I have 4 list groups, and now I want to assign each list with 4 different colors in one scatterplot in order to distinguish their groups. How should I code this part to assign each group to different colors?Image transcription text[121] mds2=np . real(mds2) Yd=pd . DataFrame (mds2, index=Dist . index) kmeans = KMeans (n_clusters=4,random_state=0) . fit(Yd) Yd [ ‘ Labels ‘ ]=kmeans . predict (Yd . values) group=[list(Yd[Yd[ ‘ Labels’ ]==i] . index) for i in range(4) ] group = sorted (group, key = len, reverse = True) [1 2] print (group [0 ]) print(gr… Show more… Show more Computer Science Engineering & Technology Python Programming ISOM 5640 Share QuestionEmailCopy link Comments (0)