title: Working with regression in pandas?
body: <p>I have a dataset like that:</p>
  
  <pre><code>height  age  gender
   140     10    male
   150     15    male
   160     20    male
   135     12    female
   170     16    female
   180     20    female
  </code></pre>
  
  <p>So far i have manipulate the data like that, predictor or response variable  is height(Y):</p>
  
  <pre><code>Y=   140           X= 1     10      1        β=   β0
       150              1     15      1             β1                                                                                           
       160              1     20      1             β2                                                
       135              1     12      0
       170              1     16      0
       180              1     20      0
  </code></pre>
  
  <p>where 1 and 0 in X matrix are male and female,</p>
  
  <p>I want to perform this function in python </p>
  
  <p>Y= β0 +  β1 X + β2 X </p>
  
  <p>β= (XT   x)   XT  Y</p>
  
  <p>where T is transpose .. i don't know how to perform it as i am not familiar with python </p>