title: Meaning of X = X[:, 1] in Python
body: <p>I am studying this snippet of python code. What does <code>X = X[:, 1]</code> mean in last line?</p>
  
  <pre><code>def linreg(X,Y):
      # Running the linear regression
      X = sm.add_constant(X)
      model = regression.linear_model.OLS(Y, X).fit()
      a = model.params[0]
      b = model.params[1]
      X = X[:, 1]
  </code></pre>