title: ValueError: Found input variables with inconsistent numbers of samples: [1319, 245]
body: <p>I am facing issues related to  <code>train_test_split</code>:</p>
  <pre><code>final = []
  final.append(dataset)
  final.append(dataset1)
  X = dataset[:,0:2]
  y = dataset1[:,2]
  X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.15, random_state=42)
  </code></pre>
  <p>error:</p>
  <pre><code>Traceback (most recent call last):
  
    File &quot;C:\Users\Lenovo\anaconda3\thesis code\TC_code.py&quot;, line 73, in &lt;module&gt;
      X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.15, random_state=42)
  
    File &quot;C:\Users\Lenovo\anaconda3\lib\site-packages\sklearn\model_selection\_split.py&quot;, line 2172, in train_test_split
      arrays = indexable(*arrays)
  
    File &quot;C:\Users\Lenovo\anaconda3\lib\site-packages\sklearn\utils\validation.py&quot;, line 299, in indexable
      check_consistent_length(*result)
  
    File &quot;C:\Users\Lenovo\anaconda3\lib\site-packages\sklearn\utils\validation.py&quot;, line 262, in check_consistent_length
      raise ValueError(&quot;Found input variables with inconsistent numbers of&quot;
  
  ValueError: Found input variables with inconsistent numbers of samples: [1319, 245]
  </code></pre>