I am getting started with Titanic Spaceship dataset. (https://www.kaggle.com/competitions/spaceship-titanic)
I am trying to understand the effect of the foodcourt feature on the transported result. On plotting a violin plot, I see that the number of passengers who did not use the foodcourt (0 expense) and did not get transported is higher as compared to the number of passengers who did not use the foodcourt (0 expense) and get transported.
However, when I use the following code, I see that the passengers who did not use the foodcourt and did not get transported are lesser as compared to the number of passengers who did not use the foodcourt and got transported.
temp = df_train.loc[df_train['FoodCourt'] == 0]
temp_0 = temp.loc[temp['Transported'] == False][enter image description here][1]
temp_1 = temp.loc[temp['Transported'] == True]
print(len(temp_0))
print(len(temp_1))


