I downloaded the kickstarter dataset from kaggle, And now I would like to see the most popular categories split up with the 3 different states ('successful', 'failed', 'cancelled') I was hoping to get an output like
main_category state name goal start_date
Film & Video failed 29653 29652 29653
Film & Video successful 21404 21404 21404
Film & Video canceled 5162 5162 5162
Music successful 21763 21763 21763
Music failed 19193 19193 19193
Publishing failed 19920 19920 19920
Technology failed 16347 16347 16347
Technology successful 5062 5062 5062
Technology canceled 3749 3749 3749
Fashion successful 4310 4310 4310
Fashion failed 11500 11500 11500
and I tried ks.groupby(['main_category','state']).count().sort_values('name', ascending=False) but that sorts to the raw numbers:
Film & Video failed 29653 29652 29653
Music successful 21763 21763 21763
Film & Video successful 21404 21404 21404
Publishing failed 19920 19920 19920
Music failed 19193 19193 19193
Technology failed 16347 16347 16347
Food failed 13602 13602 13602
I'm not sure how how to sort on the total count and than subsort on the state. I tried sorting on multiple columns but the main sorting is on the absolute numbers.
