if it is indeed a csv file, you should open and read using pandas package. Code would look like (replaced f with csvf, single letter names shouldn't be used, they mean nothing to whoever (other than the author) reads them, especially this one because starting with python 3.6, f stands for f-string and may be misinterpreted).
You should make sure values for delimiter and quotechar are correct for your file
only use next(fp) if you want to eliminate first row, which is the header and is useful for SQL insert
You should make sure values for delimiter and quotechar are correct for your file
only use next(fp) if you want to eliminate first row, which is the header and is useful for SQL insert
import pandas with open 'EMPLOYEE.csv', 'r') as csvf: df = pandas.read_csv(csvf) df.to_sql('employee', conn, if_exists='append', index=False)