title: T-test on the means pandas
body: <p>I'm woking with the Movielens dataset and I would like to do the t-test on the mean ratings value of the male and female users.</p>
  
  <pre><code>import pandas as pd
  from scipy.stats import ttest_ind
  
  users_table_names= ['user_id','age','gender','occupation','zip_code']
  users= pd.read_csv('ml-100k/u.user', sep='|', names= users_table_names)
  ratings_table_names= ['user_id', 'item_id','rating','timestamp']
  ratings= pd.read_csv('ml-100k/u.data', sep='\t', names=ratings_table_names)
  rating_df= pd.merge(users, ratings)
  
  males = rating_df[rating_df['gender']=='M']
  females = rating_df[rating_df['gender']=='F']
  
  ttest_ind(males.rating, females.rating)
  </code></pre>
  
  <p>And I get the following result:</p>
  
  <pre><code>Ttest_indResult(statistic=-0.27246234775012407, pvalue=0.7852671011802962)
  </code></pre>
  
  <p>Is this the correct way to do this operation? The results seem a bit odd.</p>
  
  <p>Thank you in advance!</p>