title: How to split data into train and test, and how to show in figure?
body: <p>I have 3176 records. i split into 80% training data and 20% testing data. But I train the following the code.</p>
  
  <p><a href="https://i.stack.imgur.com/fUJ7H.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fUJ7H.png" alt="enter image description here"></a></p>
  
  <p>this error occurs.</p>
  
  <blockquote>
    <p>Traceback (most recent call last):
      File "D:/Python Project/data.py", line 179, in 
        test_results.append(tests_new[i - 2535])
    IndexError: list index out of range</p>
  </blockquote>