I tried to calculate logical regression. I have the data as csv file. it looks like
node_id,second_major,gender,major_index,year,dorm,high_school,student_fac 0,
There's nothing wrong with your code. My guess is that you have missing values in your data. Try a dropna or use missing='drop' to Logit. You might also check that the right hand side is full rank np.linalg.matrix_rank(data[train_cols].values)
dropna
missing='drop'
np.linalg.matrix_rank(data[train_cols].values)