is straightforward once you build some familiarity with pandas to get mean movie ratings for each film grouped by genderwe can use the pivot_table methodin [ ]mean_ratings data pivot_table('rating'rows='title'cols='gender'aggfunc='mean'in [ ]mean_ratings[: out[ ]gender title $ , , duck ( 'night mother ( 'til there was you ( 'burbsthe ( and justice for all ( this produced another dataframe containing mean ratings with movie totals as row labels and gender as column labels firsti' going to filter down to movies that received at least ratings ( completely arbitrary number)to do thisi group the data by title and use size(to get series of group sizes for each titlein [ ]ratings_by_title data groupby('title'size(in [ ]ratings_by_title[: out[ ]title $ , , duck ( 'night mother ( 'til there was you ( 'burbsthe ( and justice for all ( - ( things hate about you ( dalmatians ( dalmatians ( angry men ( in [ ]active_titles ratings_by_title index[ratings_by_title > in [ ]active_titles out[ ]index(['burbsthe ( ) things hate about you ( ) dalmatians ( )young sherlock holmes ( )zero effect ( )existenz ( )]dtype=objectthe index of titles receiving at least ratings can then be used to select rows from mean_ratings abovein [ ]mean_ratings mean_ratings ix[active_titlesin [ ]mean_ratings out[ ]index entries'burbsthe ( to existenz ( movielens data set www it-ebooks info