title: sqlalchemy - join MySQL table with .csv file
body: <p>I am building a Flask app and I use sqlalchemy to access a MySQL database. This database contains all user logins. The database looks like:</p>
  
  <pre><code>LoginID (the primary key) | Username | JoinTime | LeaveTime
  </code></pre>
  
  <p>Please keep in mind that a username can be found in many rows (different logins of a user at different times or days).</p>
  
  <p>I need to generate some stats about the login location, but location data are only available in a <code>Users.csv</code> file which contains two columns: <code>username</code> and <code>location</code> for each user.</p>
  
  <p>I would like to make a join between my database table and the Users.csv file, based on the username. </p>
  
  <p>I have an sqlalchemy query which returns the users that logged in between two given dates:</p>
  
  <pre><code>logins = db_session.query(Logins.Username). \
      filter(Logins.JoinTime &gt;= session['start_date']). \
      filter(Logins.LeaveTime &lt;= session['end_date']). \
      all()
  </code></pre>
  
  <p>Is it possible to modify the above query and join the database table with the the Users.csv file? 
  I would like a list of user logins with their locations to be returned.</p>