title: logistic regression in python, Test set and Train set
body: <pre><code>file = pd.DataFrame({'name':['s', 'k', 'lo', 'ki'] , 'age':[12, 23, 32, 22], 'marks':[34, 34, 43, 22], 'score':[1, 1, 0, 1]})
  </code></pre>
  
  <p>I would like to run a logistic regression with the command : </p>
  
  <pre><code>import statsmodels.formula.api as smf 
  logit = smf.logit( 'score ~ age + marks', file)
  results = logit.fit() 
  </code></pre>
  
  <p>But I get a error:</p>
  
  <pre><code>"statsmodels.tools.sm_exceptions.PerfectSeparationError:
  Perfect separation detected, results not available". 
  </code></pre>
  
  <p>I would also split the data in to train set and test set how can I do it? I have to use the predict command after this.</p>
  
  <p>"glm" command in R looks much easier than Python. </p>