title: Python generator to read large CSV file
body: <p>I need to write a Python generator that yields tuples (X, Y) coming from two different CSV files. </p>
  
  <p>It should receive a batch size on init, read line after line from the two CSVs, yield a tuple (X, Y) for each line, where X and Y are arrays (the columns of the CSV files).</p>
  
  <p>I've looked at examples of lazy reading but I'm finding it difficult to convert them for CSVs: </p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/519633/lazy-method-for-reading-big-file-in-python">Lazy Method for Reading Big File in Python?</a></li>
  <li><a href="https://stackoverflow.com/questions/6475328/read-large-text-files-in-python-line-by-line-without-loading-it-in-to-memory">Read large text files in Python, line by line without loading it in to memory</a></li>
  </ul>
  
  <p>Also, unfortunately Pandas Dataframes are not an option in this case.</p>
  
  <p>Any snippet I can start from?</p>
  
  <p>Thanks</p>