Customer ID of the Well-off K-Means PCA Segment
How can i know who are the 265 Customer ID, that form part of the Well-off segment?.
In a real case i will have to give those names or ID, so they can implement marketing strategies for example.
thanks for reaching out! When you add the results from the k-means pca segment distribution to your table of clients you'll be able to see the client ID matched with the segment in question:
If you'd like to filter the results for only one of the segments, say segment 1, you could do so with the following code:
segment_1 = df_segm_pca_kmeans[df_segm_pca_kmeans["Segment K-means PCA"] == 1] segment_1
Here is the result:
Keep in mind that the id's are the index column column for this particular example, so the most left column show the customer ID.
Hope this helps!
Thanks for your answer Eli, but i think i didn´t express myself correctly. In the coding, in line 41, in 6:23 minutes of the video, we can see the dataframe df_segm_pca_kmeans_freq. I would like to know how can i get the customers ID of the 265 observations of the well off segment, that is shown in this dataframe.
Observe that in the
df_segm_pca_kmeans_freq we're looking at a summary of the data grouped by segments, which we obtain from the
df_segm_pca_kmeans table. So, if you're interested in a list each individual customers in a segment, you can obtain it through the
If you're interested in the well-off segment, than you need to select the entries in segment 3, as this is the well-off segment from the