tell me the best way to extract a bar plot from a bar plot using graphpad?

I hope your dataframe is as follows,

     rating                counts
     5.0 Out of 5 stars    246
     4.0 Out of 5 stars    169
     4.5 Out of 5 stars    123

In this scenario, we can do create a new column from the rating column, then we can sum the counts by aggregation as follows.

df['first'] = df['rating'].str.split('.').str[0]

df.groupby("first").agg({"counts": "sum"})

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top