title: Unable to use Datetime data in SVM model
body: <p>I have a <code>dataframe</code> to predict the energy consumption. The columns. are <code>Timestamp</code> and <code>Daily KWH system</code>.</p>
  
  <p>When used in the SVM model, I'm getting <code>Value error</code> as below:
  <code>ValueError: Unknown label type: array([   0.        ,  127.2264855 ,   80.74373643, ...,    7.67569729,
            3.32998307,    2.08538807])</code></p>
  
  <p>Dataset consists of energy consumption for every half hour from Sept to Dec.
  Here's a sample dataset</p>
  
  <pre><code>           Timestamp                 Daily_KWH_System
  0        2016-09-07  19:47:07        148.978580
  1        2016-09-07  19:47:07        104.084760
  2        2016-09-07  19:47:07        111.850947
  3        2016-09-07  19:47:07          8.421390
  4        2016-12-15  02:48:07         13.778317
  5        2016-12-15  02:48:07          0.637790
  </code></pre>
  
  <p>So far I have done :</p>
  
  <p>Read the CSV</p>
  
  <pre><code> data = pd.read_csv('C:/Users/anagha/Documents/Python Scripts/Half_Ho.csv')
  </code></pre>
  
  <p>Indexing </p>
  
  <pre><code> data['Timestamp'] = pd.to_datetime(data['Timestamp'])
   data.index = data['Timestamp']
   del data['Timestamp']
   data
  </code></pre>
  
  <p>Plot the graph</p>
  
  <pre><code> data.resample('D', how='mean').plot()
  </code></pre>
  
  <p>Splitting into Train and Test</p>
  
  <pre><code> from sklearn.utils import shuffle
  
   test  = shuffle(test)
   train = shuffle(train)
  
   trainData  = train.drop('Daily_KWH_System' , axis=1).values
   trainLabel = train.Daily_KWH_System.values
  
   testData  = test.drop('Daily_KWH_System' , axis=1).values
   testLabel = test.Daily_KWH_System.values
  </code></pre>
  
  <p>SVM Model</p>
  
  <pre><code>  from sklearn import svm
    model = svm.SVC(kernel='linear', gamma=1) 
    model.fit(trainData,trainLabel)
    model.score(trainData,trainLabel)
  </code></pre>
  
  <p>Predict Output</p>
  
  <pre><code>   predicted= model.predict(testData)
     print(predicted)
  </code></pre>