title: How to use sklearn "LinearRegression" with list?
body: <p>I have a list like this:</p>
  <pre><code>list1 = [['2012', '1', '3', '1', '832.0', '261.0', '100.00'],
   ['2012', '1', '5', '1', '507.0', '193.0', '92.50'],
   ['2012', '2', '3', '1', '412.0', '200.0', '95.00'],
   ['2012', '2', '5', '1', '560.0', '335.0', '90.00'],
   ['2012', '3', '3', '1', '584.0', '205.0', '100.00'],
   ['2012', '3', '5', '1', '595.0', '162.0', '92.50'],
   ['2012', '4', '3', '1', '504.0', '227.0', '100.00'],
   ['2012', '4', '5', '1', '591.0', '264.0', '92.50'],
   ['2012', '5', '3', '1', '489.0', '234.0', '100.00'],
   ['2012', '5', '5', '1', '561.0', '292.0', '95.00'],
   ['2012', '6', '3', '1', '622.0', '221.0', '100.00'],
   ['2012', '6', '5', '1', '478.0', '204.0', '92.50'],
   ['2012', '7', '3', '1', '974.0', '290.0', '100.00'],
   ['2012', '7', '5', '1', '553.0', '269.0', '95.00'],
   ['2012', '8', '3', '1', '473.0', '158.0', '100.00'],
   ['2012', '8', '5', '1', '526.0', '174.0', '92.50'],
   ['2012', '9', '3', '1', '701.0', '189.0', '95.00'],
   ['2012', '9', '5', '1', '502.0', '179.0', '97.50'],
   ['2012', '10', '3', '1', '470.0', '184.0', '100.00'],
   ['2012', '10', '5', '1', '579.0', '218.0', '92.50']]
  </code></pre>
  <p>The seventh column of each line is Y data,the fifth column and sixth column of each line are X data.
  I want to calculate &quot;intercept&quot; and &quot;coef&quot; with this list.
  If there is a csv file,I know how to do it,for example:</p>
  <pre><code>import pandas as pd
  from sklearn import linear_model
  
  wine = pd.read_csv( r&quot;D:/1.csv&quot;,sep=',' )
  clf = linear_model.LinearRegression()
  X = wine.drop( 'point', axis=1 )
  y = wine['point']
  clf.fit( X, y )
  print( clf.intercept_,clf.coef_[0],clf.coef_[1] )
  </code></pre>
  <p>My csv:
  <a href="https://i.stack.imgur.com/8XG6t.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8XG6t.png" alt="enter image description here" /></a></p>
  <p>But now,I need to calculate &quot;intercept&quot; and &quot;coef&quot; with list.
  How to do it?</p>