title: How to open and convert sqlite database to pandas dataframe
body: <p>I have downloaded some datas as a sqlite database (data.db) and I want to open this database in python and then convert it into pandas dataframe.</p>
  
  <p>This is so far I have done</p>
  
  <pre><code>import sqlite3
  import pandas    
  dat = sqlite3.connect('data.db') #connected to database with out error
  pandas.DataFrame.from_records(dat, index=None, exclude=None, columns=None, coerce_float=False, nrows=None)
  </code></pre>
  
  <p>But its throwing this error</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/usr/local/lib/python2.7/dist-packages/pandas/core/frame.py", line 980, in from_records
      coerce_float=coerce_float)
    File "/usr/local/lib/python2.7/dist-packages/pandas/core/frame.py", line 5353, in _to_arrays
      if not len(data):
  TypeError: object of type 'sqlite3.Connection' has no len()
  </code></pre>
  
  <p>How to convert sqlite database to pandas dataframe</p>