title: My data .sql isn't recognized as a database using sqlite3
body: <p>i'm trying to import my data (.sql) and convert it to .csv in my python code.
  I choose to use sqlite3 to connect the data.sql, but i find this error:</p>
  
  <p>(I leave the code and the error below)</p>
  
  <pre><code>import sqlite3
  
  # Open the file
  f = open('output.csv', 'w')
  # Create a connection and get a cursor
  connection = sqlite3.connect('data.sql')
  cursor = connection.cursor()
  # Execute the query
  cursor.execute('select * from data')
  # Get data in batches
  while True:
      # Read the data
      df = pd.DataFrame(cursor.fetchmany(1000))
      # We are done if there are no data
      if len(df) == 0:
          break
      # Let's write to the file
      else:
          df.to_csv(f, header=False)
  
  # Clean up
  f.close()
  cursor.close()
  connection.close()
  
  
  
  cursor.execute('select * from data')
  sqlite3.DatabaseError: file is not a database
  </code></pre>