is this code correct for polulating database ?

is this code correct for polulating database ?

import csv

import sqlite3

cur=con.cursor()

  #passenger-data.csv

with open (sys.argv[1] , ‘r’) as fin:

  csvin=csv.reader(fin)

  passenger_data=[line for line in csvin]#every line a list with strings

  for k in company_data[1:]:

    cur.execute(‘INSERT OR IGNORE INTO marta(index, date, route_id, direction, stop_id, stop_name, on_number, off_number,vehicle_id ) VALUES(?,?,?,?,?,?,?,?)’ , (‘index’, ‘date’, ‘route_id’, ‘direction’, ‘stop_id’, ‘stop_name’, ‘on_number’, ‘off_number’,’vehicle_id’ ))

    cur.execute(‘INSERT OR IGNORE INTO marta(index, date, route_id, direction, stop_id, stop_name, on_number, off_number,vehicle_id ) VALUES(?,?,?,?,?,?,?,?)’ , (k[0],k[1],k[2],k[4],k[5],k[7],k[8],k[9]))

if __name__ == “__main__”:

  import sys

  main(sys.argv)

opulate the database

https://www.dropbox.com/s/5yq259rjb8qme7l/passenger_data.csv?dl=0

https://www.dropbox.com/s/h9592ln0y6h5amp/marta-schema.sql?dl=0

  • Develop a python script called import_marta.py that reads in the given csv file and stores the information from the appropriate columns of the csv file into the appropriate table(s) of the database, which you can assume has already been created using your marta-schema.sql script.
  • The name of the csv file and the database will be passed in as command line arguments to your program. Do not hard code the name of the csv file or the database. Your program must be able to read from the csv file whose name is given as the first command line argument and write to the database whose name is given in the second command line argument
  • Your program will be run in the following manner:

$ python import_marta.py passenger_data.csv marta localhost rootPassword for







Calculate Your Essay Price
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Order your essay today and save 10% with the coupon code: best10

Academic Pros