Last answered:

08 Apr 2020

Posted on:

07 Apr 2020

0

Customer Analytics in Python

df_segm_kmeans["Segment k-means"] = kmeans.labels_     while entering above line...it was creating series in......df_segm_analysis...... what is the reason?     the video from.........k means clustering (k-means clustering results). in your video explanation, you didn't get that series in the data frame output..
1 answers ( 0 marked as helpful)
Instructor
Posted on:

08 Apr 2020

0
Hi Ramanjaneyulu,  the df_segm_kmeans data frame is our regular data df_segmentation + the assigned cluster from each algorithm. So, in this data frame we have a line for each customer, 2000 in total, with a column for their Age, Occupation, etc. and the cluster they've been assigned to. So the dimension of this table are 2000 rows by 8 columns df_segm_analysis, on the other hand, is a summary table for the four clusters and has 4 lines in total. Here, for each cluster we have information on the distribution of each feature: Age, Occupation, Income and so on. When we create it the table has the size 4 rows by 7 columns (though we add 2 additional columns later on). Hope this clears up the confusion! Best,  Eli

Submit an answer