title: How can I split a Dataset from a .csv file for Training and Testing?
body: <p>I'm using Python and I need to split my .csv imported data in two parts, a training and test set, E.G 70% training and 30% test. </p>
  
  <p>I keep getting various errors, such as <code>'list' object is not callable</code> and so on. </p>
  
  <p>Is there any easy way of doing this?</p>
  
  <p>Thanks</p>
  
  <p>EDIT:</p>
  
  <p>The code is basic, I'm just looking to split the dataset.</p>
  
  <pre><code>from csv import reader
  with open('C:/Dataset.csv', 'r') as f:
      data = list(reader(f)) #Imports the CSV
      data[0:1] ( data )
  </code></pre>
  
  <p><code>TypeError: 'list' object is not callable</code></p>