Issue
I have this dataframe which has exactly 2 columns. I need to know the frequency of each pair of data.
I saw this method in Stack:
base_plot2 = base_plot.groupby(["pred", col_y]).size()
However, it doesn't work. I got this issue, and I can't figure why.
ValueError: Grouper and axis must be same length
Solution
Try with
col_y = "Rating M"
base_plot2 = base_plot.groupby(["pred", col_y]).size()
Or
base_plot.groupby(["pred","Rating M"]).size()
Answered By - BENY
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.