Is there an efficient way to do it?

Hi all,
I am working on the Google playstore dataset and I am trying to plot Content Rating vs. Total number of Apps in that category.
The unique Content Rating are: ‘Adults only 18+’, ‘Everyone’, ‘Everyone 10+’, ‘Mature 17+’, ‘Teen’
, ‘Unrated’
At first I tried to group by ‘Content Rating’ but I wasn’t able to do anything helpful with that information.
So, I had to add an extra column named ‘Content Rating’ and add values for that column manually (see In [246]).

I was able to achieve what I expected to plot but it wasn’t the best possible solution.
Is there an efficient way to do it?

If you are not okay with this graph, you might try to plot a sorted bar graph or a line graph. That would make it a little better.

  1. You don’t need to add additional column for the names, just use category_installs_cat.index to show the index names.
  2. You can also use the function sort_values() to sort the dataframe.

Hey! Thank you so much

category_installs_cat.index worked

1 Like

In an another way you can do df.reset_index() to seperate the index column and the names column, so now you will get a new dataframe that has 2 columns, One names other counts.

Oh Yes that works too. Thanks a lot…

1 Like