Read data from CSV and insert into Database | Python Tutorial

preview_player
Показать описание
Wanna buy me a coffee? :
BTC: 18aykL2WcZX8S1BCheV85JJgPQWWXoPvAS
ETH: 0xe3bb3c3650a084e1229a8574d9f611c01d3b847f
RVN: RLNRybTC8TzqoxWC65mrK4yF4BRPZFarzY
ZEC: t1YU7XLWVfA7uMQdRWknZ37rxvJ72xcL4uL

In this tutorial we will see how we can read a CSV and insert the data from the CSV to a MySQL database table.

If you have any issues, feel free to comment below and I'll help you out.

Social Media:

#pythonmysql #csvtomysql
Рекомендации по теме
Комментарии
Автор

you the man! wasn't able to import numbers but after removing some extra " ", it now goes smoothly

CastleBomber
Автор

Thank you so much bro, I have followed your video and this works for me.

jairogarcia
Автор

I am getting "You have error in your SQL syntax; check the manual that corresponds to your mysql server version" error in insert command. Initially I used mysql.connector and got this error. Now even after using this module, I'm getting the same error. How to overcome it or should I reinstall older supported version of mysql ?

weiyingcomeback
Автор

appreciate this video bro thank you! background music FROM 4:20 got the thumbs up from me #YSLFORLIFE

dayojnr
Автор

How do we take if we have \n as newline?in the writelines?

jenaleo
Автор

how to insert ONLY new rows of csv to psql with some existing data there (id set as primary key)

harshpratap
Автор

Hi bro!
Good explanation. How do we take if we have "multiple" rows
as you have taken for three rows only
value = (row[0], row[1], row[2])

santoshs
Автор

Hello every time we run the program same data will be inserted into db this will lead to duplication. How to overcome that

navyac
Автор

Cool video, but wondering why you couldn't turn the music off while you recorded? Roomates?

lbbrfarangkiinok
Автор

Hello can we replace Mysqldb import with Sqlite3. thank you.

anthonywilly
Автор

please any one can help me, how to establish the connection using sqlite3

aminasaed
Автор

I want to creat a stock prediction website for my college project....i have csv files....please tell me how to insert csv file data into database

ananyagaur
Автор

Great tutorial very usefull, may i ask is the table already exist in mysql or it is created when we input the data in python

syahrulsupian
Автор

Hello CODE City. can you assis with what you used as while trying to add your values into the data base. i am seeing something like (*s, *s, *s) the video is not clear please.

anthonywilly
Автор

If i have rows and in every row has 10 column, it will be so long inserting. How can I do faster inserting data from csv file?

maksatatajanow
Автор

Hi if I want to load 2 Or 3 lakh data into database using python how can i do that

charultyagi
Автор

Can i have the github link to the code please??

Also will this code works for Null Values in the csv??

ayush.pratap.singh.
Автор

I have over 23 columns and 70000 rows to insert. How do i populate the columns without using the row1, row 2, row 3

MichelUNITED
Автор

What's the song in the background tho?

milanmalla
Автор

Pip is not work, you have other method to install MySQL-python?

thchessrush