EXTREMEXPLOIT

SQL Query Bot

Oct 28th, 2021
738
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from pandas import read_csv
  2.  
  3. FILENAME = 'UPF Riders.csv'
  4. tableName ='headquarters'
  5.  
  6. fileData = read_csv(FILENAME, header=None).to_numpy()
  7.  
  8. for data in fileData:
  9.     code, latitude, longitude, postal_address = data[:4]
  10.     sql_query = f"INSERT INTO {tableName}(code, latitude, longitude, postal_address) VALUES ({code},'{latitude}','{longitude}',"+ '"' + str(postal_address) + '"' + ");"
  11.     print(sql_query)
RAW Paste Data