5/7/2023 0 Comments Datagrip import csv![]() Then we insert our row-wise contents of csv file into our database through executemany() method which will replace (?,?) with the next two comma-separated data of the csv file and insert it as a record into the person table.We extract all the contents of the csv file into our contents variable through csv.reader() method.We open the above-created csv file using the open() function.We first create our person table and create a csv file with the contents inside which we will be inserting into our table.At this point, we create a cursor object to handle queries on the database table.Then we connect to our geeks database using the nnect() method. ![]()
0 Comments
Leave a Reply. |