title: Reshaping data for Linear regression
body: <p>I am trying to create an Linear Regression model in python . code is as follow</p>
  
  <pre><code>time_values = np.linspace(1,23,23) # print from 1,2...23
  number_of_clients = [] # create empty list that will hold number of clients
  for i in range(1,24,1):
      rand_vlaue = random.randint(1,20) # generate number of clients
      number_of_clients.append(rand_vlaue)
  
  print time_values
  print number_of_clients
  
  model = LinearRegression()
  model.fit(time_values,number_of_clients)
  model.predict(24)
  </code></pre>
  
  <p>I am getting the following error while running</p>
  
  <pre><code>Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.
  </code></pre>